We will be offering mothur and R workshops throughout 2019. Learn more.

Difference between revisions of "Get.seqs"

From mothur
Jump to: navigation, search
(New page: Given a list of accession numbers (i.e. sequence names) and one or more file formats, generate a new file that contains only those sequences. The keep option indicates that you want the f...)
 
m
Line 1: Line 1:
 
Given a list of accession numbers (i.e. sequence names) and one or more file formats, generate a new file that contains only those sequences.  The keep option indicates that you want the file to contain the sequences; if keep=false, generate files without those sequence names.
 
Given a list of accession numbers (i.e. sequence names) and one or more file formats, generate a new file that contains only those sequences.  The keep option indicates that you want the file to contain the sequences; if keep=false, generate files without those sequence names.
  
 +
__NOTOC__
  
 
==Options==
 
==Options==
 
accnos, fasta, name, group, alignreport; each takes a file name and keep (default=true)
 
accnos, fasta, name, group, alignreport; each takes a file name and keep (default=true)
 +
  
 
==Required==
 
==Required==
 
accnos and one of fasta/name/group/alignreport
 
accnos and one of fasta/name/group/alignreport
 +
  
 
==Output==
 
==Output==
*.pick.*
+
<nowiki>*.pick.*</nowiki>
  
  
 
==Algorithm==
 
==Algorithm==
 +
 
# read accnos file into a set<string> container, close the file
 
# read accnos file into a set<string> container, close the file
 
# read through the file to be parsed and for each entry, if the sequence name is in the set<string> container:
 
# read through the file to be parsed and for each entry, if the sequence name is in the set<string> container:
 
** spit the data out to the new file and delete the entry from the set<string> container (the opposite is true when keep=false)
 
** spit the data out to the new file and delete the entry from the set<string> container (the opposite is true when keep=false)
 
** otherwise do nothing
 
** otherwise do nothing

Revision as of 17:32, 23 June 2009

Given a list of accession numbers (i.e. sequence names) and one or more file formats, generate a new file that contains only those sequences. The keep option indicates that you want the file to contain the sequences; if keep=false, generate files without those sequence names.


Options

accnos, fasta, name, group, alignreport; each takes a file name and keep (default=true)


Required

accnos and one of fasta/name/group/alignreport


Output

*.pick.*


Algorithm

  1. read accnos file into a set<string> container, close the file
  2. read through the file to be parsed and for each entry, if the sequence name is in the set<string> container:
    • spit the data out to the new file and delete the entry from the set<string> container (the opposite is true when keep=false)
    • otherwise do nothing