BGI-shenzhen / BamDeal

BamDeal: a comprehensive toolkit for bam manipulation
MIT License
52 stars 20 forks source link

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

Open ChinJCheung opened 5 years ago

ChinJCheung commented 5 years ago

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?

hewm2008 commented 5 years ago

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
ChinJCheung commented 5 years ago

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".