Question: Error while running BWA
1
gravatar for Bioinfonext
3.2 years ago by
Bioinfonext200
Korea
Bioinfonext200 wrote:

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.

bwa rna-seq • 1.4k views
ADD COMMENTlink modified 3.2 years ago by skbrimer610 • written 3.2 years ago by Bioinfonext200
1

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 REPLYlink modified 3.2 years ago • written 3.2 years ago by michael.ante3.6k

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 REPLYlink written 3.2 years ago by Bioinfonext200
1

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 REPLYlink modified 3.2 years ago • written 3.2 years ago by michael.ante3.6k
0
gravatar for skbrimer
3.2 years ago by
skbrimer610
United States
skbrimer610 wrote:

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 COMMENTlink written 3.2 years ago by skbrimer610
1

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 REPLYlink written 3.2 years ago by skbrimer610

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

Thanks Yogesh

ADD REPLYlink written 3.2 years ago by Bioinfonext200
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1637 users visited in the last hour