SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert BAM file to FASTQ malachig Bioinformatics 28 02-02-2016 03:04 AM
Convert merged BAM back to per lane BAM or FASTQ file danielsbrewer Bioinformatics 6 10-03-2013 07:29 AM
FastQ/BAM compression tir_al General 16 05-15-2013 12:38 AM
Reverse engineering BAM files: BAM -> FASTQ gene coder Bioinformatics 3 01-03-2012 02:42 PM
Stand Alone Bam to FASTQ dcfargo Bioinformatics 11 08-02-2010 05:56 AM

Reply
 
Thread Tools
Old 08-29-2013, 12:33 AM   #1
hugh_hang
Member
 
Location: Hangzhou, China

Join Date: Jan 2013
Posts: 28
Question fastq to bam

Hi!
Can anyone tell me is it possible to convert a .fastq file to a .bam file? How to convert or which tool can I use?
Thanks in advance.
hugh_hang is offline   Reply With Quote
Old 08-29-2013, 03:00 AM   #2
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,077
Default

Yes it is possible to convert a fastq file to BAM but only after you use a suitable alignment tool to align it to a reference.
GenoMax is offline   Reply With Quote
Old 08-29-2013, 03:49 AM   #3
JackieBadger
Senior Member
 
Location: Halifax, Nova Scotia

Join Date: Mar 2009
Posts: 381
Default

Fastq is raw data (input)...BAM is an alignment file (output)

One is generated from the other using mapping/ de novo assembly software...One can not simply convert
JackieBadger is offline   Reply With Quote
Old 08-29-2013, 03:57 AM   #4
hugh_hang
Member
 
Location: Hangzhou, China

Join Date: Jan 2013
Posts: 28
Default

Quote:
Originally Posted by JackieBadger View Post
Fastq is raw data (input)...BAM is an alignment file (output)

One is generated from the other using mapping/ de novo assembly software...One can not simply convert
thank you, could you tell me how to align or map fastq? what tool will you recommend?
hugh_hang is offline   Reply With Quote
Old 08-29-2013, 04:17 AM   #5
GenoMax
Senior Member
 
Location: East Coast USA

Join Date: Feb 2008
Posts: 7,077
Default

Quote:
Originally Posted by hugh_hang View Post
thank you, could you tell me how to align or map fastq? what tool will you recommend?
See the link I had included in my response in post #2.
GenoMax is offline   Reply With Quote
Old 08-29-2013, 05:26 AM   #6
bishwo
Junior Member
 
Location: Finland

Join Date: Jan 2012
Posts: 8
Default

Use FastqToSam from picard tools. Then convert sam to bam using SamFormatConverter.
bishwo is offline   Reply With Quote
Old 08-29-2013, 05:27 AM   #7
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Quote:
Originally Posted by JackieBadger View Post
Fastq is raw data (input)...BAM is an alignment file (output)

One is generated from the other using mapping/ de novo assembly software...One can not simply convert
Well, you can store unmapped reads in SAM/BAM, so a simple conversion at that level is possible although not what is usually meant (aligning):
http://blastedbio.blogspot.co.uk/201...ve-sambam.html
maubp is offline   Reply With Quote
Old 01-30-2015, 09:00 PM   #8
madhavi
Member
 
Location: India

Join Date: Jan 2015
Posts: 14
Default

Hi i am new to NGS analysis. I have read and tried many answers regarding converting fastq to sam through picard tools, But it dnt work out? is there any other way to do that?thank u.
madhavi is offline   Reply With Quote
Old 01-30-2015, 10:11 PM   #9
hugh_hang
Member
 
Location: Hangzhou, China

Join Date: Jan 2013
Posts: 28
Unhappy

Quote:
Originally Posted by madhavi View Post
Hi i am new to NGS analysis. I have read and tried many answers regarding converting fastq to sam through picard tools, But it dnt work out? is there any other way to do that?thank u.
I am afraid I don't know more than you do. I just followed them and get something undesirable.
hugh_hang is offline   Reply With Quote
Old 01-31-2015, 03:01 AM   #10
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

You probable need to use a read mapping tool like BWA or Bowtie2 to align the raw FASTQ reads to a genome giving you aligned reads in SAM/BAM format.

This is not simply "converting" from FASTQ to SAM/BAM. The tools look at each FASTQ read and search the genome looking to find where it matches best in order to "align" the read to the genome.

(I am basically repeating what GenoMax said in his first reply at the start of this thread.)
maubp is offline   Reply With Quote
Old 05-22-2015, 12:51 AM   #11
kaps
Member
 
Location: Uganda

Join Date: Jan 2015
Posts: 71
Default

Quote:
Originally Posted by bishwo View Post
Use FastqToSam from picard tools. Then convert sam to bam using SamFormatConverter.
Hello I seen a script on this link https://code.google.com/p/fasta-to-fastq/ that converts fasta to fastq either as standalone or unix workflow.

How can use I it either as standalone or unix?

Last edited by kaps; 05-22-2015 at 12:54 AM. Reason: error posting
kaps is offline   Reply With Quote
Reply

Tags
fastq bam sam, fastq files

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 09:49 PM.


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