carnivoreSeqRuns: Sequencing run files for the carnivore biome dataset

Description Usage Format Source Examples

Description

A dataset containing SRA submission details of the SRA dataset for BioProject PRJNA386767 "Intestinal biome sequencing of carnivores".

Usage

1

Format

An object of class data.frame with 192 rows and 5 columns.

Source

https://www.ncbi.nlm.nih.gov/bioproject/PRJNA386767

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
## This data was generated in R using the following code:
## Not run: 
## create an SRA database connection

## library(SRAdb)
## sqlfile <- "SRAmetadb.sqlite"
## if(!file.exists(sqlfile)){
##    sqlfile <- getSRAdbFile()
##}

## sra_con <- dbConnect(SQLite(),sqlfile)

## download the samle data from SRA
## carnivoreSeqRuns <- getSRA(search_terms = '"Intestinal biome sequencing of carnivores"',
##                           sra_con=sra_con, acc_only=FALSE)

## add sample data stored in sample_attribute
## carnivoreSeqRuns <- carnivoreSeqRuns[, c('run','study','sample',
##                                        'experiment', 'sample_attribute')]

## sample.vars <- strsplit(carnivoreSeqRuns$sample_attribute, " \\|\\| ")

## sample.variable <- lapply(sample.vars, function(x){
##    what <- strsplit(x, ": ")
##    variable <- lapply(what, "[[", 2)
##    names(variable) <- lapply(what, "[[", 1)
##    variable
##})

## this creates the object distributed with the package
## carnivoreSeqRuns <- cbind(carnivoreSeqRuns, do.call(rbind, sample.variable))

## The data linked at
##\url{https://svalbard.biologie.hu-berlin.de:443/d/c291b870178f4abc8c59/}
##for download in the vignette #
##\url{https://derele.github.io/MultiAmplicon/articles/MultiAmplicon-real-world-example.html}
##can then be downloaded as follows
## carnivoreSeqRuns$sample_attribute <- NULL

## runs <- carnivoreSeqRuns$run

## destDir <- "download_sra"

## if(!file_test("-d", destDir)) dir.create(destDir)

## fastqFiles <- list.files(destDir, pattern=".fastq.gz", full.names=TRUE)

## if(!length(fastqFiles)){
##    getSRAfile(runs, sra_con, fileType = 'fastq' , srcType = "ftp",
##               destDir=destDir)
##    fastqFiles <- list.files(destDir, pattern=".fastq.gz", full.names=TRUE)
##  }
##
## End(Not run)

derele/MultiAmplicon documentation built on May 15, 2019, 5:04 a.m.