Skip to content
This repository was archived by the owner on Mar 21, 2019. It is now read-only.

Download Reference Genomes

cstubben edited this page Sep 5, 2014 · 3 revisions

You can search Entrez Genomes to find strains that are often mentioned in the literature by checking the Reference Genome section, for example, the Burkholderia pseudomallei page lists B. pseudomallei strain K96243 as the Reference strain. The next step is to download the GFF annotations from the Genomes ftp site (ftp.ncbi.nlm.nih.gov/genomes). The read.ncbi.ftp function in the `genomes' package requires the name of the ftp organism directory, and on the new genomes FTP site announced in Aug 2014, this is just the species names and RefSeq assembly Acc.

bpgff <- read.ncbi.ftp( "Burkholderia_pseudomallei/GCF_000011545", "gff")
bpgff
GRanges with 5935 ranges and 4 metadata columns:
       seqnames       ranges strand |       locus     feature              description        gene
          <Rle>    <IRanges>  <Rle> | <character> <character>              <character> <character>
  [1] NC_006350 [   1, 1116]      - |    BPSL0001         CDS carboxylate-amine ligase            
  [2] NC_006350 [1161, 2375]      - |    BPSL0002         CDS     hypothetical protein  
  ... 

table(values(bpgff)$feature)

    CDS miscRNA  pseudo    rRNA    tRNA 
   5727       8     127      12      61 

The summaryTag function in the genomes2 package lists the locus tag prefixes, suffixes and tag ranges from coding regions. The prefixes are needed to search PMC, create the string pattern to extract locus tags from XML, and expand tag pairs marking the start and end of a region. Alternately, the locus tags or gene names could be used as a dictionary to find matches within the document, but in many cases there are new locus tags that are not found within GFF3 files.

summaryTag(bpgff)
$prefix
BPSL BPSS 
3398 2329 

$suffix
 a  A  b  B  c  d 
36 41  7  6  1  1 

$range
[1]    1 3431

$digits
   4 
5727 

Finally, this saves the tags and gene names.

bplocus <- values(bpgff)$locus
bpgenes <- sort(unique(unlist( strsplit(values(bpgff)$gene, ",") )))

Clone this wiki locally