SEQanswers

Go Back   SEQanswers > Sequencing Technologies/Companies > Oxford Nanopore



Similar Threads
Thread Thread Starter Forum Replies Last Post
BWA-MEM: output mapped reads larger than input reads Kennels Bioinformatics 9 09-05-2013 05:27 PM
BWA Mate-sw reads orionzhou Bioinformatics 0 05-25-2011 01:30 PM

Reply
 
Thread Tools
Old 12-04-2015, 12:44 PM   #1
NU_454
Junior Member
 
Location: Chicago, IL

Join Date: Feb 2011
Posts: 5
Question bwa and nanopore reads

Has anyone used bwa (0.7.12) with the mem -x ont2d option on nanopore 2D reads? FAQ's in bwa doc says "BWM-MEM works with Oxford Nanopore reads with a sequencing error rate over 20%.
I've been able to create a .sam file with about 40,000 2d reads aligned to a single chromosome .fa file, but then have had issues seeing my data.
NU_454 is offline   Reply With Quote
Old 12-05-2015, 03:47 AM   #2
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 819
Default

It works fine for me. What's your problem?

For extracting mapped reads, you can use samtools (to find mapped reads only) and awk:

Code:
samtools view -F 4 input.bam | grep -v '^@' awk '{print "@"$1"\n"$10"\n+\n"$11}' > mapped.fastq
gringer is offline   Reply With Quote
Old 12-07-2015, 07:53 AM   #3
NU_454
Junior Member
 
Location: Chicago, IL

Join Date: Feb 2011
Posts: 5
Default

sorry I am new at this. thanks for your help.
here is what I have done:
I used bwa to index my reference
./bwa index /home/nanopore/chr6.fa

then I used bwa to align my files into a sam file (all 2d fastq files were cat together into one file)

./bwa mem -x ont2d /home/nanopore/chr6.fa /home/nanopore/MAP006_10122015.fastq > /home/nanopore/aln.sam

I then used samtools to convert the sam file to a bam file:

./samtools view -bs aln.sam > aln.bam

and finally sorted the bam file:

./samtools sort aln.bam aln_sort


So the problem I am having is the sam file seems to be readable (at least in a text editor I can see the sequence info along with a header and some alphanumeric codes before each sequence, but the bam files are all symbols)

If I try to view the bam file in GenomeBrowse I get an error "Data for this zoom level is unavailable until background computation is complete.

Am I doing something wrong, or missing a step?
NU_454 is offline   Reply With Quote
Old 12-07-2015, 08:29 AM   #4
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 6,780
Default

BAM format is a binary representation so it is not surprising that you can no longer "see" the contents of that file. That part should be ok. You workflow is also proper.

I suggest that you use IGV to view the data instead of Genomebrowse. Follow the user guide here since you are new to IGV.
GenoMax is offline   Reply With Quote
Old 12-07-2015, 09:12 AM   #5
gringer
David Eccles (gringer)
 
Location: Wellington, New Zealand

Join Date: May 2011
Posts: 819
Default

Or Tablet.
gringer is offline   Reply With Quote
Old 12-07-2015, 12:52 PM   #6
NU_454
Junior Member
 
Location: Chicago, IL

Join Date: Feb 2011
Posts: 5
Default

Thank you!

My problem was with either my sorting or indexing. Once I used the tools in IGV to sort and index my sam file I can now view my data.

Tablet looks good too! Thanks for the link.
NU_454 is offline   Reply With Quote
Reply

Tags
2d reads, bwa, nanopore

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT -8. The time now is 01:19 PM.


Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Single Sign On provided by vBSSO