How To Make Two Mates Of Any Alignment To Be Adjacent
0
0
Entering edit mode
10.4 years ago
yanhe83 • 0

I am dealing with some De novo RNA-seq data (paired-end). First, I assemblied the reads to contigs using Trinity. Then, I mapped the short reads to the contigs with BWA. In order to calculate the abundance of each transcript, I used RSEM software. However, this software requires the two mates of any alignment to be adjacent. Does anyone know how to do this? The problem has been disturbing me for several days. Thanks in advance.

rna-seq alignment • 5.3k views
ADD COMMENT
0
Entering edit mode

Have you read the "using an alternative aligner" part of the README and followed the link for the "convert-sam-for-rsem" page and script?

ADD REPLY
0
Entering edit mode

Thanks for your relpy! Yes, I read the "using an alternative aligner" part of the README and followed the "rsem-sam-validator" and "convert-sam-for-rsem" page and script. After running "rsem-sam-validator" , I got the following message :"One of paired-end read HWUSI-EAS1588:2:1:5189:1816#CAGATC's alignment does not have two mates adjacent to each other! If you're running covert-sam-for-rsem now, this might mean the read contains duplicate alignments." Then, I run samtools sort -n for my bam file. After sorting, I run the "rsem-sam-validator"again, I got the same msg. So I was wondering the samtools sort can't make the mates adjacent. Any other ideas? Thanks!

ADD REPLY
0
Entering edit mode

It's more likely that you have a chimeric read and the validator can't deal with that. Just samtools view something.bam | grep "HWUSI-EAS1588:2:1:5189:1816" and have a look at the reads. It's best to just have a look at the data when you run into problems.

ADD REPLY
0
Entering edit mode

I don't know about RSEM, but you can sort so that mates are adjacent with samtools sort -n

ADD REPLY
0
Entering edit mode

Thanks for your reply. I run samtools sort -n, but still got error message from RSEM saying that the two mates of alignment not adjacent. Any other ideas?

ADD REPLY
0
Entering edit mode

To get pairs you could try:

samtools view -bf2 input.bam | samtools sort -n - output
ADD REPLY

Login before adding your answer.

Traffic: 1034 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6