Error while running BWA
2
1
Entering edit mode
8.0 years ago
Bioinfonext ▴ 470

I build Indexing using this cammand:

/home/yog/software/bwa-0.7.15/bwa index Rs_1.0.cds.fasta

After that I am running BWA cammand for mapping raw reads to indexed transcripts using this cammand:

/home/yog/software/bwa-0.7.15/bwa mem Rs_1.0.cds.fasta 216.all.right.fasta 216.all.left.fasta >paired-end.aln.sam

It showing error:

/home/yog/software/bwa-0.7.15/bwa mem Rs_1.0.cds.fasta 216.all.right.fasta 216.all.left.fasta >paired-end.aln.sam [bns_restore_core] Parse error reading Rs_1.0.cds.fasta.amb

Please suggest how I can resolve it.

RNA-Seq bwa • 3.2k views
ADD COMMENT
1
Entering edit mode

In the command

/home/yog/software/bwa-0.7.15/bwa mem Rs_1.0.cds.fasta 216.all.right.fasta 216.all.left.fasta >paired-end.aln.sam

Shouldn't you use the created index rather than the fasta file?

ADD REPLY
0
Entering edit mode

I did indexing first and after that I run BWA.

I build Indexing using this cammand:

/home/yog/software/bwa-0.7.15/bwa index Rs_1.0.cds.fasta

After that I am running BWA cammand for mapping raw reads to indexed transcripts using this cammand:

/home/yog/software/bwa-0.7.15/bwa mem Rs_1.0.cds.fasta 216.all.right.fasta 216.all.left.fasta >paired-end.aln.sam

Now can you suggest me how to get unmapped Right and Left reads in two separate file using samtool or sambanba cammand from the output sam file.

ADD REPLY
1
Entering edit mode

So, you resolved your first problem. Can you shortly comment on this?

A sam file has for each alignment a set of flags stored in one number. You can check the number you need at this web site: https://broadinstitute.github.io/picard/explain-flags.html . With samtools view -f [respectively -F] you can select those alignments having (resp. having not) this bit.

ADD REPLY
0
Entering edit mode
8.0 years ago
skbrimer ▴ 740

The error is most likely due to the data index being formated incorrectly. In the past I have used Biopython to fix white space issues with fast files. You can use the SeqIO.convert function and "convert" it to fasta again. The function will format the fasta correctly and it should resolve the issue.

ADD COMMENT
1
Entering edit mode

Sorry, time changes. If you still need it. The code should look like this.

From Bio import SeqIO
For seq in SeqIO.parsre("in.fasta", "fasta", "out.fasta", "fasta")

You can either use it in Python itself or write a quick script to accept the input from the command line.

ADD REPLY
0
Entering edit mode

I installed biopython, if you can share the code for SeqIO will be helpful for me.

Thanks Yogesh

ADD REPLY

Login before adding your answer.

Traffic: 2233 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