SEQanswers

Go Back   SEQanswers > Bioinformatics > Bioinformatics



Similar Threads
Thread Thread Starter Forum Replies Last Post
MAQ Scores & Quantify maq alignments? AnamikaDarwin Bioinformatics 5 09-19-2015 09:24 AM
Extract subset of Fastq sequences based on a list of IDs pepperoni Bioinformatics 36 05-06-2013 02:38 AM
How to extract sequences between adaptors ? Giorgio C Bioinformatics 8 07-13-2011 01:10 AM
who know extract linker/Primer sequences for HTS sequencing? feng Bioinformatics 2 10-26-2010 03:19 PM
Mapping reads with adapter sequences using MAQ seq_GA Bioinformatics 1 11-05-2009 11:32 PM

Reply
 
Thread Tools
Old 01-10-2010, 06:42 PM   #1
johnsequence
Member
 
Location: california

Join Date: Jan 2010
Posts: 22
Default EXTRACT MAQ sequences?

how to simply extract the sequences of a gene list (~1000) in FASTA format from a sequence database (~400MB) in FASTA format generated by MAQ?
johnsequence is offline   Reply With Quote
Old 01-11-2010, 04:02 AM   #2
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Are you starting with a ~400MB FASTA file, containing ~1000 sequences, and you just want the list of sequence identifiers ("gene names")?

Try something like this at the Unix command line:

grep "^>" my_database.fasta

That string "^>" is a regular expression meaning look for any lines starting ("^") with the greater than symbol.
maubp is offline   Reply With Quote
Old 01-11-2010, 01:15 PM   #3
johnsequence
Member
 
Location: california

Join Date: Jan 2010
Posts: 22
Default

Thanks for reply. I actually need the IDs (headers) and sequences in FASTA format.
johnsequence is offline   Reply With Quote
Old 01-12-2010, 02:49 AM   #4
maubp
Peter (Biopython etc)
 
Location: Dundee, Scotland, UK

Join Date: Jul 2009
Posts: 1,543
Default

Quote:
Originally Posted by johnsequence View Post
Thanks for reply. I actually need the IDs (headers) and sequences in FASTA format.
So you have a large FASTA file, and a list of entries you want to extract from it, to give a smaller subset as a new FASTA file? This is a very general problem, and not specific to MAQ at all.

How is your list of identifiers stored? e.g. a text file with one id per line?

I would suggest you write a simple script, e.g. using Perl (perhaps with BioPerl) or Python (perhaps with Biopython), or your preferred script language.
http://bioperl.org/wiki/HOWTO:SeqIO
http://biopython.org/wiki/SeqIO

Or, if you are happier just working at the command line, you can probably do this with EMBOSS seqret.
http://emboss.sourceforge.net/apps/r...ps/seqret.html
maubp is offline   Reply With Quote
Old 01-12-2010, 05:55 AM   #5
kmcarr
Senior Member
 
Location: USA, Midwest

Join Date: May 2008
Posts: 1,173
Default

You can use a couple of the utilities in the BLAST package from NCBI. Take your large FASTA file and create a BLAST database from it using formatdb. Then retrieve just the sequences you want from the BLASTdb using the fastacmd tool.

Code:
%> formatdb -i <your.FASTA.file> -p F -n <your.blast.db>

%> fastacmd -d <your.blast.db> -i <your.ID.file> > <output.file>
The first command takes your FASTA file and creates your.blast.db. The -p F tells formatdb that this is a nucleotide database. The second command extracts the FASTA formatted reads from the BLAST db based on the list of of IDs in your.ID.file.
kmcarr is offline   Reply With Quote
Reply

Tags
maq, sequence

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 02:27 AM.


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