WGLab/LIQA

LIQA quantify crashes with newest version of lifelines and -f_weight 0

Closed this issue · 1 comments

If I run liqa -task quantify -refgene test.refgene -bam test.bam -out tmp.out -max_distance 10 -f_weight 0 given the files here: liqa_test.zip, I get the error:

Traceback (most recent call last):
  File "/panfs/home/yang4414/fryxx094/data/long_reads/encode/.snakemake/conda/260abc8a7999313925724c944b07e7e7/lib/python3.9/site-packag
    raise ValueError("Empty array/Series passed in.")
ValueError: Empty array/Series passed in.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/panfs/home/yang4414/fryxx094/data/long_reads/encode/.snakemake/conda/260abc8a7999313925724c944b07e7e7/lib/python3.9/site-packag
    kmf.fit(Tforkmf, event_observed=Eforkmf)
  File "/panfs/home/yang4414/fryxx094/data/long_reads/encode/.snakemake/conda/260abc8a7999313925724c944b07e7e7/lib/python3.9/site-packag
    return function(model, *args, **kwargs)
  File "/panfs/home/yang4414/fryxx094/data/long_reads/encode/.snakemake/conda/260abc8a7999313925724c944b07e7e7/lib/python3.9/site-packag
    return self._fit(durations, event_observed, timeline, entry, label, alpha, ci_labels, weights)
  File "/panfs/home/yang4414/fryxx094/data/long_reads/encode/.snakemake/conda/260abc8a7999313925724c944b07e7e7/lib/python3.9/site-packag
    (self.durations, self.event_observed, self.timeline, self.entry, self.event_table, self.weights) = _preprocess_inputs(
  File "/panfs/home/yang4414/fryxx094/data/long_reads/encode/.snakemake/conda/260abc8a7999313925724c944b07e7e7/lib/python3.9/site-packag
    durations = np.asarray(pass_for_numeric_dtypes_or_raise_array(durations)).reshape((n,))
  File "/panfs/home/yang4414/fryxx094/data/long_reads/encode/.snakemake/conda/260abc8a7999313925724c944b07e7e7/lib/python3.9/site-packag
    raise ValueError("Values must be numeric: no strings, datetimes, objects, etc.")
ValueError: Values must be numeric: no strings, datetimes, objects, etc.

I only get this error after I updated the lifelines package to version v0.27.1. I get the expected output using v0.26.4 with no error.

I'm using LIQA on very sparse data (sometimes 1 or 2 reads), which causes the modeling to break in some circumstances. I think that's what's happening here. In earlier versions of lifelines I think they passed on this error, but in the new version they may have explicitly raised the error, which we are seeing now. That's at least my guess.

I've run the same commands on the test files you have attached, and you are likely correct that with the updated version of lifelines, this error is passed. I would keep your environment with this version of lifelines (0.26.4) to ensure LIQA runs optimally.