Closed zhemingfan closed 1 year ago
Hi there! This may be related to the use of cram files (also raised in #23). Currently cram files are not supported, only bam files. It looks like the error is happening when SAVANA is trying to access the cram file. If you try with bam files does this resolve the issue?
I'll also look into adding cram support for a future release :)
Hi @helrick,
Thanks for the quick response and adding in CRAM file support. It was a little unintuitive to me that both normal/tumour pair had be the same file type. Something like this could be a quick fix?
aln_files = {
'tumour': pysam.AlignmentFile(args.tumour, "rb") if args.tumour.endswith('bam') else pysam.AlignmentFile(args.tumour, "rc") if args.tumour.endswith('cram') else sys.exit('Unrecognized file extension. Tumour and normal files must be BAM/CRAM'),
'normal': pysam.AlignmentFile(args.normal, "rb") if args.normal.endswith('bam') else pysam.AlignmentFile(args.normal, "rc") if args.normal.endswith('cram') else sys.exit('Unrecognized file extension. Tumour and normal files must be BAM/CRAM')
}
Otherwise, if this is intended behaviour - that would be helpful to know too :) I've closed the ticket. Thank you!
Hi @zhemingfan,
Unfortunately, since CRAM files don't store information about the number of mapped reads per contig, the very first step (finding potential breakpoints from aligned reads) needs to be parallelized differently depending on whether BAM or CRAM files were used (see code link)
I can see a way to avoid this, either by using the CRAM parallelization method when at least one files is a CRAM, or parallelizing differently depending on the filetype, but it would require a bit of re-engineering. To avoid this, I made the assumption that people would be storing their tumour and normal files in the same format. If this isn't the case though I can look into adding this feature in future.
Thank you @helrick for the update!
I was able to resolve this internally - it's not too much of an issue from our end.
Hi @helrick,
Hope you're doing well. I downloaded the image from https://quay.io/repository/biocontainers/savana?tab=tags with
singularity pull docker://quay.io/biocontainers/savana:1.0.0--pyhdfd78af_0
. Running the following command:led to this log:
Happy to share anything else to help you troubleshoot this.