Learn R Programming

seqinr (version 3.4-5)

extractseqs: To extract the sequences information of a sequence or a list of sequence in different formats

Description

The function allows to extract large amount of data as whole genome sequences,using different output formats and types of extraction. This function is not yet available for windows in zlib mode.

Usage

extractseqs(listname,socket = autosocket(), format="fasta",
operation="simple",feature="xx", bounds="xx", minbounds="xx",
 verbose = FALSE, nzlines=1000, zlib = FALSE)
exseq(listname,socket = autosocket(),
 format="fasta",operation="simple", feature="xx",
 bounds="xx", minbounds="xx", verbose = FALSE,  nzlines=1000, zlib = FALSE)

Arguments

listname

the name of list on server (may be a virtual list)

socket

an object of class sockconn connecting to a remote ACNUC database (default is a socket to the last opened database).

format

the format of output.Can be acnuc, fasta,flat or coordinates

operation

the type of extraction. Can be simple, translate, fragment, feature or region

feature

-optional- the feature to be extracted (for operations "feature" or "region"): a feature table item (CDS, mRNA,...)

bounds

-optional- the bounds for extraction (for operations "fragment" or "region")

minbounds

-optional- the minimal bounds for extraction (for operations "fragment" or "region")

verbose

if TRUE, verbose mode is on

nzlines

number of line in zlib mode

zlib

logical. If TRUE sequences are download in zlib compress mode.

Value

Sequence data.

Details

To extract a list of sequences (lrank argument) or a single sequence (seqnum argument) using different output formats and types of extraction. All formats except "coordinates" extract sequence data. Format "coordinates" extract coordinate data; start > end indicates the complementary strand.

listname

sequence list name.

socket

a socket of class connection and sockconn returned by choosebank. Default value (auto) means that the socket will be set to to the socket component of the banknameSocket variable.

format

acnuc, fasta, flat or coordinates

operation

simple, translate, fragment, feature or region

feature

(for operations "feature" or "region") a feature table item (CDS, mRNA,...).

simple

each sequence or subsequence is extracted.

translate

meaningful only for protein-coding (sub)sequences that are extracted as protein sequences. Nothing is extracted for non-protein coding sequences.

fragment

Allows to extract any part of the sequence(s) in list. Such part is specified by the bounds and minbounds arguments according to the syntax suggested by these examples:

132,1600 to extract from nucl. 132 to nucl 1600 of the sequence. If applied to a subsequence, coordinates are in the parent seq relatively to the subsequence start point.
-10,10 to extract from 10 nucl. BEFORE the 5' end of the sequence to nucl. 10 of it. Useful only for subsequences, and produces a fragment extracted from its parent sequence.
e-20,e+10 to extract from 20 nucl. BEFORE the 3' end of the sequence to 10 nucl. AFTER its 3' end. Useful only for subsequences, and produces a fragment extracted from its parent sequence.

bounds

(for operations "fragment" or "region") see syntax above.

minbounds

same syntax as bounds. When the sequence data is too short for this quantity to be extracted, nothing is extracted. When the sequence data is between minbounds and bounds, extracted sequence data is extended by N's to the desired length.

References

citation("seqinr")

See Also

choosebank, query getlistrank

Examples

Run this code
# NOT RUN {
 
# }
# NOT RUN {
# Need internet connection
 choosebank("emblTP")
 mylist <- query("mylist", "k=globin", virtual = TRUE)
 mylist.fasta <- exseq("mylist", verbose = TRUE)
 # 103 lines of FASTA 
 stopifnot(length(mylist.fasta) == 103)
 closebank()
 
# }

Run the code above in your browser using DataLab