Description Usage Arguments Details Value Examples
View source: R/salmon-wrapper.R
Run the abundance quantification tool Salmon
on a set of FASTQ
files. Requires Salmon
(https://combine-lab.github.io/salmon/)
to be installed and a Salmon transcript index must have been generated prior
to using this function. See the Salmon website for installation and basic
usage instructions.
1 2 3 4 5 6 | runSalmon(targets_file, transcript_index, single_end = FALSE,
output_prefix = "output", lib_type = "A", n_processes = 2,
n_thread_per_process = 4, n_bootstrap_samples = 0, seqBias = TRUE,
gcBias = TRUE, posBias = FALSE, allowOrphans = FALSE,
advanced_opts = NULL, verbose = TRUE, dry_run = FALSE,
salmon_cmd = "salmon")
|
targets_file |
character string giving the path to a tab-delimited text file with either 2 columns (single-end reads) or 3 columns (paired-end reads) that gives the sample names (first column) and FastQ file names (column 2 and if applicable 3). The file is assumed to have column headers, although these are not used. |
transcript_index |
character string giving the path to the Salmon index to be used for the feature abundance quantification. |
single_end |
logical, are single-end reads used, or paired-end reads? |
output_prefix |
character string giving the prefix for the output folder
that will contain the Salmon results. The default is |
lib_type |
scalar, indicating RNA-seq library type. See Salmon documentation for details. Default is "A", for automatic detection. |
n_processes |
integer giving the number of processes to use for
parallel Salmon jobs across samples. The package |
n_thread_per_process |
integer giving the number of threads for Salmon to use per process (to parallelize Salmon for a given sample). Default is 4. |
n_bootstrap_samples |
integer giving the number of bootstrap samples that Salmon should use (default is 0). With bootstrap samples, uncertainty in abundance can be quantified. |
seqBias |
logical, should Salmon's option be used to model and correct
abundances for sequence specific bias? Default is |
gcBias |
logical, should Salmon's option be used to model and correct
abundances for GC content bias? Requires Salmon version 0.7.2 or higher.
Default is |
posBias |
logical, should Salmon's option be used to model and correct
abundances for positional biases? Requires Salmon version 0.7.3 or higher.
Default is |
allowOrphans |
logical, Consider orphaned reads as valid hits when performing lightweight-alignment. This option will increase sensitivity (allow more reads to map and more transcripts to be detected), but may decrease specificity as orphaned alignments are more likely to be spurious. For more details see Salmon documentation. |
advanced_opts |
character scalar supplying list of advanced option
arguments to apply to each Salmon call. For details see Salmon documentation
or type |
verbose |
logical, should timings for the run be printed? |
dry_run |
logical, if |
salmon_cmd |
(optional) string giving full command to use to call Salmon, if simply typing "salmon" at the command line does not give the required version of Salmon or does not work. Default is simply "salmon". If used, this argument should give the full path to the desired Salmon binary. |
A Salmon transcript index can be built from a FASTA file:
salmon index [arguments] FASTA-file
. See the Salmon documentation
for further details. This simple wrapper does not give access to all nuances
of Salmon usage. For finer-grained usage of Salmon please run it at the
command line - results can still be read into R with
readSalmonResults
.
A list containing three elements for each sample for which feature
abundance has been quantified: (1) salmon_call
, the call used for
Salmon, (2) salmon_log
the log generated by Salmon, and (3)
output_dir
the directory in which the Salmon results can be found.
1 2 3 4 5 6 7 8 9 10 | ## Not run:
## If in Salmon's 'test' directory, then try these calls:
## Generate 'targets.txt' file:
write.table(data.frame(Sample="sample1", File1="reads_1.fastq.gz", File2="reads_1.fastq.gz"),
file="targets.txt", quote=FALSE, row.names=FALSE, sep="\t")
Salmon_log <- runSalmon("targets.txt", "transcripts.idx", single_end=FALSE,
output_prefix="output", verbose=TRUE, n_bootstrap_samples=10,
dry_run = FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.