| Read location {GeneR} | R Documentation |
Extract from a GeneBank file some features
readGbkLocation(file,name=NA, path="", from = 1, to = 0, index = "ix", key = "CDS",key2="locus_tag") readEmblLocation(file,name=NA, path="", from=1, to=0, index="ix", key="CDS",key2="locus_tag")
file |
File of the bank |
name |
Name of the sequence in the bank (default: first sequence) |
path |
Path to the bank |
from,to |
Begining and ending of sequence, can be vectors. 0 represent the last nucleotide and 1 the first one. |
index |
"ix": name is accn of sequence. "id" : name is id of sequence. |
key |
String. Feature that we want positions. (ex: GENE, CDS...) |
key2 |
String. label that we want precisions (ex: locus_tag, note, codon_start...). |
A list with:
locations.begins |
Begining positions of feature "key" |
locations.ends |
Ending positions of feature "key" |
locations.begins.limits |
Foreach begining position , get if it is exact (0) or fuzzy (1) |
locations.ends.limits |
Foreach ending position , get if it is exact (0) or fuzzy (1) |
locations.strand |
Foreach position, get if it strand si 5'-3' (0) or 3'-5' (1) |
locations.key2 |
Label corresponding to "key2". |
Use this function carefully: bug found...
P.Durosay(C), L.Cottret(R), A. Lucas
## Not run:
# Get SARS Sequence
seqNcbi("NC_004718",file="NC_004718.gbk",type="G")
# Get CDS Positions
readGbkLocation(file="NC_004718.gbk")
# Get peptides...
readGbkLocation(file="NC_004718.gbk",key="mat_peptide",key2="product")
## End(Not run)
# The same with EMBL...
#
# Get SARS Sequence
## Not run:
download.file("http://bioinfo.hku.hk/sars/AY291451.seq",
destfile="AY291451.seq")
# Get CDS Positions
readEmblLocation(file="AY291451.seq")
# Get peptides...
readEmblLocation(file="AY291451.seq",key="mat_peptide",key2="product")
## End(Not run)