Skip to contents

Generate commands to run salmon on the files from a standardized sample sheet as the ones we exchange with collaboration partners

Usage

run_salmon(
  samples_info_sheet,
  salmon_bin = "salmon",
  salmon_index_dir,
  salmon_output_dir = "_quants",
  quants_prefix = "sample_scenarioid_sampleid_",
  salmon_ncores = 12,
  salmon_options = "--validateMappings",
  create_script = TRUE,
  script_name = "salmonrunner.sh",
  display_commands = TRUE,
  force = FALSE
)

Arguments

samples_info_sheet

Character string,

salmon_bin

Character, specifying the name of the executable to be run as salmon. Defaults to "salmon", which is perfectly fine if the tool is available in the PATH, be that system wide or (even better) with a conda environment

salmon_index_dir

Character, defines the folder where the salmon index is located. Needs to be specified by the user.

salmon_output_dir

Character, specifies the folder where the outputs of salmon will be written into. Sensibly defaults to "_quants", which matches the folder structure we are familiar with

quants_prefix

Character - what string should be prepended to the values of the id field in the samples_info_sheet

salmon_ncores

Numeric, number of cores to be used by salmon

salmon_options

Character string, contains all additional salmon parameters. Defaults to --validateMappings, but could also be an empty string or set to NULL

create_script

Logical value, whether to create or not a script - its name is specified by script_name

script_name

Character string, name of the script to write commands into. Defaults to "salmonrunner.sh"

display_commands

Logical, whether to print out to the console the commands as message. Defaults to TRUE

force

Logical value, whether to overwrite the file in script_name if already existing. Defaults to FALSE

Value

Invisible NULL, the function prints out the commands as messages and as a file, optionally

Examples

mysheet <- samplesheet_creator(ss_filename = "mysheet", ss_dir = tempdir())
#> Created a new sample sheet for 4 samples with the following fields:
#> id, fastq_file1, fastq_file2, group, project_scenario, sample_id, quants_files, notes
#> ------
#> Please make sure to fill in the respective info fields, 
#> following the indications in the pre-filled cells
run_salmon(readxl::read_excel(mysheet), salmon_index_dir = "/myindex/dir",
           create_script = FALSE)
#> Running salmon with index located at /myindex/dir
#> Creating output quantifications at _quants
#> salmon quant --index /myindex/dir --libType A -1 INFO: fill in with the location of the .fastq(.gz) files -2 INFO: fill in (if paired end data is available) -o _quants/sample_scenarioid_sampleid_id1 --threads 12 --validateMappings
#> salmon quant --index /myindex/dir --libType A -r INFO: fill in with the location of the .fastq(.gz) files -o _quants/sample_scenarioid_sampleid_id2 --threads 12 --validateMappings
#> salmon quant --index /myindex/dir --libType A -r INFO: fill in with the location of the .fastq(.gz) files -o _quants/sample_scenarioid_sampleid_id3 --threads 12 --validateMappings
#> salmon quant --index /myindex/dir --libType A -r INFO: fill in with the location of the .fastq(.gz) files -o _quants/sample_scenarioid_sampleid_id4 --threads 12 --validateMappings