.\" Man page generated from reStructuredText. . .TH "OBIGREP" "1" "Jul 27, 2019" " 1.02 13" "OBITools" .SH NAME obigrep \- description of obigrep . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .sp The \fI\%obigrep\fP command is in some way analog to the standard Unix \fIgrep\fP command. It selects a subset of sequence records from a sequence file. .sp A sequence record is a complex object composed of an identifier, a set of attributes (\fBkey=value\fP), a definition, and the sequence itself. .sp Instead of working text line by text line as the standard Unix tool, selection is done sequence record by sequence record. A large set of options allows refining selection on any of the sequence record elements. .sp Moreover \fI\%obigrep\fP allows specifying simultaneously several conditions (that take the value \fBTRUE\fP or \fBFALSE\fP) and only the sequence records that fulfill all the conditions (all conditions are \fBTRUE\fP) are selected. .SH SEQUENCE RECORD SELECTION OPTIONS .INDENT 0.0 .TP .B \-s , \-\-sequence= .INDENT 7.0 .INDENT 3.5 Regular expression pattern to be tested against the sequence itself. The pattern is case insensitive. .UNINDENT .UNINDENT .sp \fIExamples:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-s \(aqGAATTC\(aq seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records that contain an \fIEcoRI\fP restriction site. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-s \(aqA{10,}\(aq seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records that contain a stretch of at least 10 \fBA\fP\&. .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-s \(aq^[ACGT]+$\(aq seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records that do not contain ambiguous nucleotides. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-D , \-\-definition= .INDENT 7.0 .INDENT 3.5 Regular expression pattern to be tested against the definition of the sequence record. The pattern is case sensitive. .UNINDENT .UNINDENT .sp \fIExample:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-D \(aq[Cc]hloroplast\(aq seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records whose definition contains \fBchloroplast\fP or \fBChloroplast\fP\&. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-I , \-\-identifier= .INDENT 7.0 .INDENT 3.5 Regular expression pattern to be tested against the identifier of the sequence record. The pattern is case sensitive. .UNINDENT .UNINDENT .sp \fIExample:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-I \(aq^GH\(aq seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records whose identifier begins with \fBGH\fP\&. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-\-id\-list= .INDENT 7.0 .INDENT 3.5 \fB\fP points to a text file containing the list of sequence record identifiers to be selected. The file format consists in a single identifier per line. .UNINDENT .UNINDENT .sp \fIExample:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-\-id\-list=my_id_list.txt seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records whose identifier is present in the \fBmy_id_list.txt\fP file. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-a :, .UNINDENT .INDENT 0.0 .TP .B \-\-attribute=: .INDENT 7.0 .INDENT 3.5 Regular expression pattern matched against the attributes of the sequence record\&. the value of this attribute is of the form : key:regular_pattern. The pattern is case sensitive. Several \fB\-a\fP options can be used on the same command line and in this last case, the selected sequence records will match all constraints. .UNINDENT .UNINDENT .sp \fIExample:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-a \(aqfamily_name:Asteraceae\(aq seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects the sequence records containing an attribute whose key is \fBfamily_name\fP and value is \fBAsteraceae\fP\&. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-A , \-\-has\-attribute= .INDENT 7.0 .INDENT 3.5 Selects sequence records having an attribute whose key = . .UNINDENT .UNINDENT .sp \fIExample:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-A taxid seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records having a \fItaxid\fP attribute defined. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-p , \-\-predicat= .INDENT 7.0 .INDENT 3.5 Python boolean expression to be evaluated for each sequence record. The attribute keys defined for each sequence record can be used in the expression as variable names. An extra variable named ‘sequence’ refers to the sequence record itself. Several \-p options can be used on the same command line and in this last case, the selected sequence records will match all constraints. .UNINDENT .UNINDENT .sp \fIExample:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-p \(aq(forward_error<2) and (reverse_error<2)\(aq \e seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records whose \fBforward_error\fP and \fBreverse_error\fP attributes have a value smaller than two. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-L <##>, \-\-lmax=<##> .INDENT 7.0 .INDENT 3.5 Keeps sequence records whose sequence length is equal or shorter than \fBlmax\fP\&. .UNINDENT .UNINDENT .sp \fIExample:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-L 100 seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records that have a sequence length equal or shorter than 100bp. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-l <##>, \-\-lmin=<##> .INDENT 7.0 .INDENT 3.5 Selects sequence records whose sequence length is equal or longer than \fBlmin\fP\&. .UNINDENT .UNINDENT .sp \fIExamples:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-l 100 seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records that have a sequence length equal or longer than 100bp. .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B \-v, \-\-inverse\-match .INDENT 7.0 .INDENT 3.5 Inverts the sequence record selection. .UNINDENT .UNINDENT .sp \fIExamples:\fP .INDENT 7.0 .INDENT 3.5 .INDENT 0.0 .INDENT 3.5 .sp .nf .ft C > obigrep \-v \-l 100 seq1.fasta > seq2.fasta .ft P .fi .UNINDENT .UNINDENT .sp Selects only the sequence records that have a sequence length shorter than 100bp. .UNINDENT .UNINDENT .UNINDENT .SH TAXONOMY RELATED OPTIONS .INDENT 0.0 .TP .B \-d , \-\-database= ecoPCR taxonomy Database name .UNINDENT .INDENT 0.0 .TP .B \-t , \-\-taxonomy\-dump= NCBI Taxonomy dump repository name .UNINDENT .INDENT 0.0 .TP .B \-\-require\-rank= select sequence with taxid tag containing a parent of rank .UNINDENT .INDENT 0.0 .TP .B \-r , \-\-required= required taxid .UNINDENT .INDENT 0.0 .TP .B \-i , \-\-ignore= ignored taxid .UNINDENT .SH OPTIONS TO SPECIFY INPUT FORMAT .SS Restrict the analysis to a sub\-part of the input file .INDENT 0.0 .TP .B \-\-skip The N first sequence records of the file are discarded from the analysis and not reported to the output file .UNINDENT .INDENT 0.0 .TP .B \-\-only Only the N next sequence records of the file are analyzed. The following sequences in the file are neither analyzed, neither reported to the output file. This option can be used conjointly with the \fI–skip\fP option. .UNINDENT .SS Sequence annotated format .INDENT 0.0 .TP .B \-\-genbank Input file is in genbank format. .UNINDENT .INDENT 0.0 .TP .B \-\-embl Input file is in embl format. .UNINDENT .SS fasta related format .INDENT 0.0 .TP .B \-\-fasta Input file is in fasta format (including OBITools fasta extensions). .UNINDENT .SS fastq related format .INDENT 0.0 .TP .B \-\-sanger Input file is in Sanger fastq format (standard fastq used by HiSeq/MiSeq sequencers). .UNINDENT .INDENT 0.0 .TP .B \-\-solexa Input file is in fastq format produced by Solexa (Ga IIx) sequencers. .UNINDENT .SS ecoPCR related format .INDENT 0.0 .TP .B \-\-ecopcr Input file is in ecoPCR format. .UNINDENT .INDENT 0.0 .TP .B \-\-ecopcrdb Input is an ecoPCR database. .UNINDENT .SS Specifying the sequence type .INDENT 0.0 .TP .B \-\-nuc Input file contains nucleic sequences. .UNINDENT .INDENT 0.0 .TP .B \-\-prot Input file contains protein sequences. .UNINDENT .SH OPTIONS TO SPECIFY OUTPUT FORMAT .SS Standard output format .INDENT 0.0 .TP .B \-\-fasta\-output Output sequences in \fBOBITools\fP fasta format .UNINDENT .INDENT 0.0 .TP .B \-\-fastq\-output Output sequences in Sanger fastq format .UNINDENT .SS Generating an ecoPCR database .INDENT 0.0 .TP .B \-\-ecopcrdb\-output= Creates an ecoPCR database from sequence records results .UNINDENT .SS Miscellaneous option .INDENT 0.0 .TP .B \-\-uppercase Print sequences in upper case (default is lower case) .UNINDENT .SH COMMON OPTIONS .INDENT 0.0 .TP .B \-h, \-\-help Shows this help message and exits. .UNINDENT .INDENT 0.0 .TP .B \-\-DEBUG Sets logging in debug mode. .UNINDENT .SH AUTHOR The OBITools Development Team - LECA .SH COPYRIGHT 2019 - 2015, OBITool Development Team .\" Generated by docutils manpage writer. .