The Frontline Support team will be slow to respond December 17-18 due to an institute-wide retreat and offline December 22- January 1, while the institute is closed. Thank you for your patience during these next few weeks. Happy Holidays!
question about MergeBamAlignment
I am trying to use the pipeline from the best practice to analysis some exome data. But I get confused on the step "MergeBamAlignment".
We used bwa to map the fastq file to the reference and then, generated unmapped bam file using picard. After we merged the aligned bam file (A) and unmapped file (B), we got a merged bam file(C). However, the merge file (C) has a smaller size than both A and B.
5.7G sample.raw.bam (B)
According to informations from the guidance that MergeBamAlignment takes metadata from a SAM or BAM file of unmapped reads (uBAM) and merges it with a SAM or BAM file containing alignment records for a subset of those reads, i thought the merged file would be the largest file in A, B, and C.(http://gatkforums.broadinstitute.org/gatk/discussion/5969/how-to-generate-a-bam-for-variant-discovery-long#step7)
Why the merged file is smaller than others?
Here is my command:
$bwa mem -t 12 \
-R "@RG\tID:ID001\tLB:sample001\tSM:sample001\tPL:ILLUMINA" \
$data_dir/sample001/ID001_1.clean.fq.gz $data_dir/sample001/ID001_2.clean.fq.gz > $sam_dir/ID001.aligned.sam
java -jar $picard/SortSam.jar \
generate unmapped bam file
java -jar $picard/FastqToSam.jar \
merge two bam file
java -jar $picard/MergeBamAlignment.jar \
I would be very grateful of any advice!