Skip to content

Latest commit

 

History

History
209 lines (160 loc) · 10.5 KB

usage.md

File metadata and controls

209 lines (160 loc) · 10.5 KB

nf-core/smrnaseq Usage

General Nextflow info

Nextflow handles job submissions on SLURM or other environments, and supervises running the jobs. Thus the Nextflow process must run until the pipeline is finished. We recommend that you put the process running in the background through screen / tmux or similar tool. Alternatively you can run nextflow within a cluster job submitted your job scheduler.

It is recommended to limit the Nextflow Java virtual machines memory. We recommend adding the following line to your environment (typically in ~/.bashrc or ~./bash_profile):

NXF_OPTS='-Xms1g -Xmx4g'

Running the pipeline

The typical command for running the pipeline is as follows:

nextflow run nf-core/smrnaseq --reads '*.fastq.gz' --genome GRCh37 -profile docker

NOTE! Paired-end data is NOT supported by this pipeline! For paired-end data, use Read 1 only. For instance:

nextflow run nf-core/smrnaseq --reads '*.R1.fastq.gz'

This will launch the pipeline with the docker configuration profile (Swedish UPPMAX users use -profile uppmaxsm). See below for more information about profiles.

Note that the pipeline will create files in your working directory:

work            # Directory containing the nextflow working files
results         # Finished results for each sample, one directory per pipeline step
.nextflow_log   # Log file from Nextflow
# Other nextflow hidden files, eg. history of pipeline runs and old logs.

Updating the pipeline

When you run the above command, Nextflow automatically pulls the pipeline code from GitHub and stores it as a cached version. When running the pipeline after this, it will always use the cached version if available - even if the pipeline has been updated since. To make sure that you're running the latest version of the pipeline, make sure that you regularly update the cached version of the pipeline:

nextflow pull nf-core/smrnaseq

Reproducibility

It's a good idea to specify a pipeline version when running the pipeline on your data. This ensures that a specific version of the pipeline code and software are used when you run your pipeline. If you keep using the same tag, you'll be running the same version of the pipeline, even if there have been changes to the code since.

First, go to the nfcore/smrnaseq releases page and find the latest version number - numeric only (eg. 1.0). Then specify this when running the pipeline with -r (one hyphen) - eg. -r 1.0.

This version number will be logged in reports when you run the pipeline, so that you'll know what you used when you look back in the future.

Main Arguments

-profile

Use this parameter to choose a configuration profile. Each profile is designed for a different compute environment - follow the links below to see instructions for running on that system. Available profiles are:

  • docker
    • A generic configuration profile to be used with Docker
    • Runs using the local executor and pulls software from dockerhub: nfcore/smrnaseq
  • uppmax, uppmax_modules
    • Designed to be used on the Swedish UPPMAX clusters such as milou, rackham, bianca and irma
  • standard
    • The default profile, used if -profile is not specified at all. Runs locally and expects all software to be installed and available on the PATH.
    • This profile is mainly designed to be used as a starting point for other configurations and is inherited by most of the other profiles.
  • none
    • No configuration at all. Useful if you want to build your own config from scratch and want to avoid loading in the default base config profile (not recommended).

--reads

Location of the input FastQ files:

 --reads 'path/to/data/*.fastq.gz'

NOTE! Must be enclosed in quotes! If left unspecified, the pipeline will assume that the data is in a directory called data in the working directory.

--genome

The reference genome to use of the analysis, needs to be one of the genome specified in the config file. The human GRCh37 genome is used by default.

--genome 'GRCh37'

Supported genomes

Parameter Latin Name Common Name
AGPv3 Zea mays Maize
BDGP6 Drosophila melanogaster Fruit fly
CanFam3.1 Canis familiaris Dog
CHIMP2.1.4 Pan troglodytes Chimpanze
EquCab2 Equus caballus Horse
Galgal4 Gallus gallus Chicken
Gm01 Glycine max Soybean
GRCh37 Homo sapiens Human
GRCm38 Mus musculus Mouse
GRCz10 Danio rerio Zebrafish
IRGSP-1.0 Oryza sativa japonica Rice
Mmul_1 Macaca mulatta Macaque
Rnor_6.0 Rattus norvegicus Rat
Sbi1 Sorghum bicolor Great millet
Sscrofa10.2 Sus scrofa Pig
TAIR10 Arabidopsis thaliana Thale cress
UMD3.1 Bos taurus Cow
WBcel235 Caenorhabditis elegans Nematode

Other command line parameters

--outdir

The output directory where the results will be saved.

--email

Set this parameter to your e-mail address to get a summary e-mail with details of the run sent to you when the workflow exits. If set in your user config file (~/.nextflow/config) then you don't need to speicfy this on the command line for every run.

--plaintext_email

Set to receive plain-text e-mails instead of HTML formatted.

-name

Name for the pipeline run. If not specified, Nextflow will automatically generate a random mnemonic.

This is used in the MultiQC report (if not default) and in the summary HTML / e-mail (always).

NB: Single hyphen (core Nextflow option)

--seqCenter

Text about sequencing center which will be added in the header of output bam files.

-resume

Specify this when restarting a pipeline. Nextflow will used cached results from any pipeline steps where the inputs are the same, continuing from where it got to previously.

You can also supply a run name to resume a specific run: -resume [run-name]. Use the nextflow log command to show previous run names.

NB: Single hyphen (core Nextflow option)

-c

Specify the path to a specific config file (this is a core NextFlow command). Useful if using different UPPMAX projects or different sets of reference genomes. NOTE! One hyphen only (core Nextflow parameter).

NB: Single hyphen (core Nextflow option)

Note - you can use this to override defaults. For example, we run on UPPMAX but don't want to use the MultiQC environment module as is the default. So we specify a config file using -c that contains the following:

process.$multiqc.module = []

--mature

If you prefer, you can specify the full path to the FASTA file of mature miRNAs when you run the pipeline:

--mature [path to the FASTA file of mature miRNAs]

--hairpin

If you prefer, you can specify the full path to the FASTA file of miRNA precursors when you run the pipeline:

--hairpin [path to the FASTA file of miRNA precursors]

--bt_index

If you prefer, you can specify the full path to your reference genome when you run the pipeline:

--bt_index [path to Bowtie 1 index]

--protocol

Protocol for constructing smRNA-seq libraries. Note that trimming parameters and 3' adapter sequence are pre-defined with a specified protocol. Default: "illumina"

--protocol [one protocol listed in the table below]
Protocol Library Prep Kit Trimming Parameter 3' Adapter Sequence
illumina Illumina TruSeq Small RNA clip_R1 = 0; three_prime_clip_R1 = 0 TGGAATTCTCGGGTGCCAAGG
nextflex BIOO SCIENTIFIC NEXTFLEX Small RNA-Seq clip_R1 = 4; three_prime_clip_R1 = 4 TGGAATTCTCGGGTGCCAAGG
qiaseq QIAGEN QIAseq miRNA clip_R1 = 0; three_prime_clip_R1 = 0 AACTGTAGGCACCATCAAT
cats Diagenode CATS Small RNA-seq clip_R1 = 3; three_prime_clip_R1 = 0 GATCGGAAGAGCACACGTCTG

--rlocation

Some steps in the pipeline run R with required modules. By default, the pipeline will install these modules to ~/R/nxtflow_libs/ if not present. You can specify what path to use with this command line flag.

Trimming options

--length [int]: Discard reads that became shorter than length [int] because of either quality or adapter trimming. Default: 18 --clip_R1 [int]: Instructs Trim Galore to remove bp from the 5' end of read 1 --three_prime_clip_R1 [int]: Instructs Trim Galore to remove bp from the 3' end of read 1 AFTER adapter/quality trimming has been performed --three_prime_adapter [sequence] : Instructs Trim Galore to remove 3' adapters which are typically used in smRNA-seq library preparation

--saveReference

Supply this parameter to save any generated reference genome files to your results folder. These can then be used for future pipeline runs, reducing processing times.

--multiqc_config

If you would like to supply a custom config file to MultiQC, you can specify a path with --multiqc_config. This is used instead of the config file specific to the pipeline.

--clusterOptions

Submit arbitrary SLURM options (UPPMAX profile only). For instance, you could use --clusterOptions '-p devcore' to run on the development node (though won't work with default process time requests).

--skip_qc

Skip all QC steps aside from MultiQC

--skip_fastqc

Skip FastQC

--skip_multiqc

Skip MultiQC

Stand-alone scripts

The bin directory contains some scripts used by the pipeline which may also be run manually:

  • edgeR_miRBase.r
    • R script using for processing reads counts of mature miRNAs and miRNA precursors (hairpins).