Title: | Open GenBank Files |
Version: | 2.2 |
Description: | Opens complete record(s) with .gb extension from the NCBI/GenBank Nucleotide database and returns a list containing shaped record(s). These kind of files contains detailed records of DNA samples (locus, organism, type of sequence, source of the sequence...). An example of record can be found at https://www.ncbi.nlm.nih.gov/nuccore/HE799070. |
License: | GPL-3 |
Encoding: | UTF-8 |
RoxygenNote: | 7.1.1 |
Collate: | 'CDS.F.R' 'C_region.F.R' 'DNA.treatment.R' 'D_loop.F.R' 'D_segment.F.R' 'F_UTR.F.R' 'Feature.sep.R' 'J_segment.F.R' 'N_region.F.R' 'Reference.sep.R' 'Reorganize.report.R' 'STS.F.R' 'S_region.F.R' 'T_UTR.F.R' 'V_region.F.R' 'V_segment.F.R' 'assembly_gap.F.R' 'centromere.F.R' 'exon.F.R' 'extract.gb.R' 'gap.F.R' 'gene.F.R' 'iDNA.F.R' 'intron.F.R' 'mRNA.F.R' 'mat_peptide.F.R' 'misc_RNA.F.R' 'misc_binding.F.R' 'misc_difference.F.R' 'misc_feature.F.R' 'misc_recomb.F.R' 'misc_structure.F.R' 'mobile_element.F.R' 'modified_base.F.R' 'ncRNA.F.R' 'old_sequence.F.R' 'operon.F.R' 'oriT.F.R' 'polyA_site.F.R' 'precursor_RNA.F.R' 'prim_transcript.F.R' 'primer_bind.F.R' 'propeptide.F.R' 'protein_bind.F.R' 'rRNA.F.R' 'read.gb.R' 'regulatory.F.R' 'rep_origin.F.R' 'repeat_region.F.R' 'sig_peptide.F.R' 'source.F.R' 'stem_loop.F.R' 'tRNA.F.R' 'telomere.F.R' 'tmRNA.F.R' 'transit_peptide.F.R' 'unsure.F.R' 'variation.F.R' |
Imports: | rentrez |
NeedsCompilation: | no |
Packaged: | 2021-08-24 14:12:21 UTC; robin |
Author: | Robin Mercier [aut, cre] |
Maintainer: | Robin Mercier <robin.largon.mercier@hotmail.fr> |
Repository: | CRAN |
Date/Publication: | 2021-09-06 15:00:02 UTC |
Extracts and returns a specific item from .gb records
Description
This function regroup every items found in a list if they correspond to the character string specified. Works for general parts (ACCESSION, SOURCE...) and parts of FEATURES (source, gene, CDS...)
Usage
extract.gb(x, Item)
Arguments
x |
The name of the list containing the records. |
Item |
character. The part to extract. It have to match case. |
Value
Returns a list containing the data
Examples
## Not run:
extract.gb(Example, "gene")
## End(Not run)
Opens files with .gb extensions
Description
This function opens complete record(s) with .gb extension from the NCBI/GenBank Nucleotide database and returns a list containing shaped record(s). These kind of files contains detailed records of DNA samples (locus, organism, type of sequence, source of the sequence...). An example of record can be found at https://www.ncbi.nlm.nih.gov/nuccore/HE799070. Records with > 200'000 bp may experience long processing times, especially if they have numerous FEATURES items. Also works for reports obtained with rentrez package.
Usage
read.gb(x, DNA = TRUE, Type = "full", Source = "File")
Arguments
x |
character. The name of the file which the data are to be read from, or the character string containing the data. It can contains several records |
DNA |
logical. If TRUE, the DNA sequence in the ORIGIN part will be merged in one character string. If FALSE, the default layout will be kept. Default if TRUE |
Type |
character. Should the output contain FEATURES and REFERENCE parts ? Possible values are "full" for a full record, "nofeat" to ignore FEATURES part, "noref" to ignore REFERENCE part and "nfnr" to ignore both parts. Default is "full" |
Source |
character. If x is a character string, use "Char". If x is a filename use "File". Default is "File" |
Value
Returns a table containing the data
Examples
## Not run:
read.gb(File = "sequence.gb", DNA = TRUE, Type = "full", Source = "File")
## End(Not run)
## Not run:
require(rentrez)
data <- rentrez::entrez_fetch(db = "Nucleotide", id = "508082122", rettype = "gb")
read.gb(File = data, DNA = TRUE, Type = "full", Source = "Char")
## End(Not run)