Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'Expr' object has no attribute 'apply' #1

Open
rgal-mcw opened this issue Aug 2, 2024 · 1 comment
Open

AttributeError: 'Expr' object has no attribute 'apply' #1

rgal-mcw opened this issue Aug 2, 2024 · 1 comment

Comments

@rgal-mcw
Copy link

rgal-mcw commented Aug 2, 2024

Hi!

I'm attempting to use ont-spectre for CNV calling on our data by using the following command:

spectre CNVCaller \
  --bin-size 1000 \
  --coverage $MOSDEPTH \
  --sample-id $SAMPLE \
  --output-dir "${DIR_PATH}/spectre/" \
  --reference /data/ref/NCBI/GRCh38/Homo_sapiens_assembly38_noALT_noHLA_noDecoy_ERCC.fasta \
  --snv "${DIR_PATH}/snp_indel/clair3/phased_merge_output.vcf.gz" \

Where
-$MOSDEPTH is a directory where my Mosdepth files are stored for this sample
-$SAMPLE is my sample name
---snv "${DIR_PATH}/snp_indel/clair3/phased_merge_output.vcf.gz" is my clair3 generated SNV .vcf for this same sample.

I'm attaching the whole run log to this issue for your review.
08012024_log.txt

I'm running this in a dedicated conda environment where the packages listed in requirements.txt are the only ones I've installed.

It appears that there is an issue parsing the SNV .vcf - something to do with Polars dataframe. The SNV .vcf is unchanged from the Clair3 output.

Any further insight to this is appreciated!

-Ryan

@snurk
Copy link

snurk commented Aug 27, 2024

Dear @rgal-mcw, thank you for the report.
The issue is related to the breaking change in polars API starting from version 1.0.
Problem will be fixed in the upcoming version of ont-spectre, but in the meantime you can modify requirements.txt to force it using an older version of polars.
In particular, you can change polars[pyarrow]>=0.19.15 to use == (or ~=, which should get latest available 0.x version of polars).

-Sergey

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants