PacificBiosciences / pb-CpG-tools

Collection of tools for the analysis of CpG data
BSD 3-Clause Clear License
62 stars 5 forks source link

Segmentation fault with CRAM files - aligned_bam_to_cpg_scores #45

Closed Audald closed 1 year ago

Audald commented 1 year ago

I am trying to run aligned_bam_to_cpg_scores for my CRAM files but a "segmentation fault" error appears. The command I run is:

/path/pb-CpG-tools-v2.2.0-x86_64-unknown-linux-gnu/bin/aligned_bam_to_cpg_scores --bam sample.mm2.cram --output-prefix sample.pbmm2 --model /path/pb-CpG-tools-v2.2.0-x86_64-unknown-linux-gnu/models/pileup_calling_model.v1.tflite --threads=8

No information seems available for CRAM files and I was wondering whether this is actually possible. Thanks

ctsa commented 1 year ago

Thanks for reporting this. Cram hasn't been tested at this time, so you would need to uncompress it to bam right now to get a reliable result.

We can add this support to the feature queue, the method shouldn't be too far from supporting it already but we'd probably need to specify a fasta reference file for this case.

ctsa commented 1 year ago

Hi @Audald - I looked into it and this turned out to be a pretty simple change. We've released a new pb-CpG-tools version supporting CRAM here:

https://github.com/PacificBiosciences/pb-CpG-tools/releases/tag/v2.3.0

Just note that you will need to specify a reference fasta file for the method to read from the cram file.

Audald commented 1 year ago

Hi @ctsa, thanks for the prompt action, very much appreciated!