Hi Rebecca,
If you don't mind commercial software novosort will happily merge files
with different @SQ orders and output order will follow from the first file.
novosort -m 16G -i -o out.bam NA18867.bam Denisovan.bam
Output will be coordinate sorted and indexed.
With a license file it will run
Hi Rebecca,
samtools sort does not sort the sequence dictionary in the header, it sorts
only the reads (by read name with the -n flag that you're using). Look into
PicardTools ReorderSam (
https://broadinstitute.github.io/picard/command-line-overview.html#ReorderSam)
to reorder your sequence dicti
Hi Rebeca,
I think the merge command expects a coordinate sorted bam and you are
sorting it by query name. You should remove the "-n" flag in your sort
command and then merge the sorted files.
Regards,
Juan Montenegro
On 11 Oct 2016 6:52 AM, "Rebecca Harris" wrote:
> Hi,
>
> I have a couple of g
Hi,
I have a couple of genomes, aligned to the same reference, that I am trying
to merge using the command:
java -jar picard.jar MergeSamFiles MERGE_SEQUENCE_DICTIONARIES=true
I=NA18867.bam I=Denisovan.bam O=out.bam
Upon merging, I get an error that my BAM files are in different orders - in
part
Hi Mark,
It would be helpful if you showed the exact command used and also how you
confirmed that an alignment was lost. Just this week I saw a post (elsewhere)
where someone was losing reads in converting from SAM->BAM only to find that it
was due to misusing an obscure (present but undocument
Hello,
We have been comparing whole genome sequence bam files and we have found
that samtools sort -n either removes or modifies the reads as it sorts. We
have tried it on both the older version and version 1.0 and have had the
same results. We found that several reads are in our original file,