File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ get_amplicon <- function (amplicon ) {
2+ # put R code inside here
3+
4+ library(dplyr )
5+ library(tidyverse )
6+
7+ # # Read in the table from zenodo using the url
8+ sample_att = read.csv(
9+ ' https://zenodo.org/record/3774043/files/SRA%20Sample%20Worksheet.csv'
10+ )
11+
12+ amp = filter(sample_att , samp_mat_process == amplicon )
13+ amp
14+
15+ # # Pull the column containing the sample names.fastq
16+ amp %> % pull(sample_title.fastq )
17+
18+ # # Change rbcl into a vector
19+ amp_name <- as.vector(amp $ sample_title.fastq )
20+
21+ # # Create the urls for the files using the paste function and download the files
22+ urls = vector()
23+ for (x in 1 : length(amp_name )) {
24+ urls [x ] = paste(' https://zenodo.org/record/3736457/files/' ,
25+ amp_name [x ],
26+ sep = ' ' )
27+ download.file(urls [x ], amp_name [x ])
28+ }
29+
30+ return ()
31+ }
32+
33+ get_amplicon(' rbcLa_amplicon' )
34+
35+
36+ get_amplicon(" ITS2_amplicon" )
You can’t perform that action at this time.
0 commit comments