BamDeal icon indicating copy to clipboard operation
BamDeal copied to clipboard

using modify bamAssign with the '-r' parameter will lead to [main_samview] truncated file

Open ChinJCheung opened this issue 4 years ago • 2 comments

when I use the model of the modify bamAssign, if the -r added, the header of the output SAM/BAM will keep its own chromosomes. but it is just output a little reads and the header of the bam just include the "@SQ SN:chr1 LN:31279297" without other information such as "@RG @PG". when I use the samtools view to open the the output bam, it is display [main_samview] truncated file. So, what is the problem?

ChinJCheung avatar Nov 11 '19 14:11 ChinJCheung

A) To keep the same header, you should not add the para '-r' .
B)If the bamdeal bamAssign is running normally and completely , the samtools view should no display [truncated file]

I suggest you just remove the -r parameter, Do not add the -r parameter If not sure it really works

-r reset output files headers by remove the chromosomes not in the output files

hewm2008 avatar Nov 15 '19 01:11 hewm2008

Thanks for your help, in fact, I did remove the -r parameter at that time and the program was working properly. But I hoped to use bamdeal to pick out chromosome 1 and use the paramter '-r' to remove the other contigs except the chromosome 1 from the header "@sq".

ChinJCheung avatar Nov 20 '19 10:11 ChinJCheung