telseq icon indicating copy to clipboard operation
telseq copied to clipboard

telseq on cram files

Open jalwillcox opened this issue 5 years ago • 2 comments

Hello Zhihao,

Thanks for designing this useful tool!

I was wondering if there is a simple way to adapt it for cram input. It looks like bamtools doesn't support cram files, so maybe it's not possible, but I thought I'd check just in case.

Thanks,

Jon

jalwillcox avatar Mar 27 '19 19:03 jalwillcox

Agreed, it would be very helpful.

agilly avatar Jan 14 '20 08:01 agilly

There is a simple way using samtools if you are ok to perform it on one file at a time. In bash, you use samtools to convert CRAM to BAM in memory and pipe into telseq. I had the exact same result using a bam file created from the cram file.

samtools view -u data.cram | telseq -r 151 - > output.txt

I used the -u option for an uncompressed BAM since it doesn't need to be written to disk, hence no need for compression. The "-" in the telseq command takes standard input coming from the samtools command.

This won't work if you are wanting to use an input file with the paths of your CRAM files.

I tested this using samtools 1.6.

trickytank avatar Oct 06 '20 04:10 trickytank