Entering edit mode
6.5 years ago
bioinforesearchquestions
▴
370
Hi folks,
I used this option to downsample the bam files. Am I doing it correctly?
samtools view -s 0.15 -b input.bam > input_15X.bam
Then I used this input_15X.bam to generate wig file using HMMcopy.
readCounter -b input_15X.bam > input_15X.wig
Building index for input_15X.bam, please hold
Index creation successful
But I am getting an empty wig file.
Any recommendations are welcome.
Out of curiosity, where did you get
readCounter
from? At a glance I don't see it in HMMcopy.Does your downsampled bam have any reads at all? Try
samtools view -c input_15X.bam
or justls -lh input_15X.bam
to see if it has a decent size.readCounter is present inside the HMMcopy/scripts directory. Thanks, I fixed it. I removed the -b parameter, it was creating the index. Without the -b parameter I got the wiggle file.
But my query is -s 0.15 does it mean 15X or less than 15x?
I am getting error with the BAM file when I tried computing the collectWGSmatrix.
[Tue Apr 10 00:00:36 EDT 2018] picard.analysis.CollectWgsMetrics done. Elapsed time: 22.55 minutes. Runtime.totalMemory()=3056074752 To get help, see http://broadinstitute.github.io/picard/index.html#GettingHelp Exception in thread "main" htsjdk.samtools.SAMFormatException: SAM validation error: ERROR: Record 50656281, Read name HISEQ-MFG:170:c9w21anxx:5:2316:1885:53454, MAPQ should be 0 for unmapped read.