-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsalmon_index.R
More file actions
44 lines (40 loc) · 1.95 KB
/
salmon_index.R
File metadata and controls
44 lines (40 loc) · 1.95 KB
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
script <- "
genome=$1
transcript=$2
grep '^>' $genome | cut -d ' ' -f 1 > decoys.txt
sed -i -e 's/>//g' decoys.txt
cat $transcript $genome > gentrome.fa
salmon index -t gentrome.fa -d decoys.txt -p 12 -i salmon_index --gencode
"
salmon_index <- recipeMake(shscript = script,
paramID = c("genome", "transcript"),
paramType = c("File", "File"),
outputID = "salmonIdx",
outputType = "Directory",
outputGlob = "salmon_index",
requireTools = "salmon==1.3.0")
salmon_index <- addMeta(
salmon_index,
label = "salmon_index",
doc = "Salmon is a tool for wicked-fast transcript quantification from RNA-seq data. The recipe is to build a salmon index for your transcriptome. The script is prepared according to this instruction (https://combine-lab.github.io/alevin-tutorial/2019/selective-alignment/.)",
inputLabels = c("reference genome", "transcripts"),
inputDocs = c("The fasta file for reference genome",
"The fasta file for transcripts from gencode"),
outputLabels = c("salmon index"),
outputDocs = c("A directory containing salmon index files"),
extensions = list(
author = "rworkflow team",
date = Sys.Date(),
url = "https://salmon.readthedocs.io/en/latest/salmon.html",
example = paste(
"salmon_index <- recipeLoad('salmon_index.R')",
"salmon_index$genome <- 'GRCh38.primary_assembly.genome.fa'",
"salmon_index$transcript <- 'gencode.v42.transcripts.fa'",
"getData(salmon_index, outdir = 'data/folder', notes = c('salmon_index', 'GRCh38.primary_assembly', 'gencode.v42'))",
"",
"## Get data from local catch",
"dataUpdate('data/folder')",
"dataSearch(c('salmon_index', 'GRCh38.primary_assembly', 'gencode.v42'))",
"",
sep="\n"))
)