Workflow: Trim Galore RNA-Seq pipeline paired-end strand specific
Modified original [BioWardrobe's](https://biowardrobe.com) [PubMed ID:26248465](https://www.ncbi.nlm.nih.gov/pubmed/26248465) **RNA-Seq** basic analysis for a **pair-end** experiment. A corresponded input [FASTQ](http://maq.sourceforge.net/fastq.shtml) file has to be provided. Current workflow should be used only with the single-end RNA-Seq data. It performs the following steps: 1. Trim adapters from input FASTQ files 2. Use STAR to align reads from input FASTQ files according to the predefined reference indices; generate unsorted BAM file and alignment statistics file 3. Use fastx_quality_stats to analyze input FASTQ files and generate quality statistics files 4. Use samtools sort to generate coordinate sorted BAM(+BAI) file pair from the unsorted BAM file obtained on the step 1 (after running STAR) 5. Generate BigWig file on the base of sorted BAM file 6. Map input FASTQ files to predefined rRNA reference indices using Bowtie to define the level of rRNA contamination; export resulted statistics to file 7. Calculate isoform expression level for the sorted BAM file and GTF/TAB annotation file using GEEP reads-counting utility; export results to file
- Selected
- |
- Default Values
- Nested Workflows
- Tools
- Inputs/Outputs
Inputs
ID | Type | Title | Doc |
---|---|---|---|
threads | Integer (Optional) | Number of threads |
Number of threads for those steps that support multithreading |
clip_3p_end | Integer (Optional) | Clip from 3p end |
Number of bases to clip from the 3p end |
clip_5p_end | Integer (Optional) | Clip from 5p end |
Number of bases to clip from the 5p end |
exclude_chr | String (Optional) | Chromosome to be excluded in rpkm calculation |
Chromosome to be excluded in rpkm calculation |
max_multimap | Integer (Optional) | Maximum number of loci the read is allowed to map to |
Maximum number of loci the read is allowed to map to |
minimum_rpkm | Float (Optional) | Minimum RPKM for Gene Body Average Tag Density Plot |
Minimum RPKM for Gene Body Average Tag Density Plot |
annotation_file | File [GTF] | Annotation file |
GTF or TAB-separated annotation file |
chrom_length_file | File [Textual format] | Chromosome length file |
Chromosome length file |
fastq_file_upstream | File [FASTQ] | FASTQ read1 input file |
Reads data in a FASTQ format, received after paired end sequencing |
max_multimap_anchor | Integer (Optional) | Maximum number of loci anchors are allowed to map to |
Maximum number of loci anchors are allowed to map to |
star_indices_folder | Directory | STAR indices folder |
Path to STAR generated indices |
bowtie_indices_folder | Directory | BowTie Ribosomal Indices |
Path to Bowtie generated indices |
fastq_file_downstream | File [FASTQ] | FASTQ read2 input file |
Reads data in a FASTQ format, received after paired end sequencing |
Steps
ID | Runs | Label | Doc |
---|---|---|---|
get_stat |
../tools/collect-statistics-rna-seq.cwl
(CommandLineTool)
|
Tool processes and combines log files generated by Trimgalore, Bowtie, Samtools and MACS2. |
|
trim_fastq |
../tools/trimgalore.cwl
(CommandLineTool)
|
Tool runs Trimgalore - the wrapper around Cutadapt and FastQC to consistently apply adapter and quality trimming
to FastQ files. |
|
bypass_trim |
../tools/bypass-trimgalore-pe.cwl
(CommandLineTool)
|
If the number of reads in the trimmed_fastq_file_1 is less then min_reads_count, tool will return original_fastq_file_1/2 and nulls as selected_report_file_1/2. Otherwise, the trimmed_fastq_file_1/2 and trimming_report_file_1/2 will be returned. Might be usefull in case of trimgalore removed all reads from the original_fastq_file_1/2. |
|
star_aligner |
../tools/star-alignreads.cwl
(CommandLineTool)
|
Tool runs STAR alignReads. |
|
get_gene_body |
../tools/plugin-plot-rna.cwl
(CommandLineTool)
|
Gene body average tag density plot and RPKM distribution histogram |
Runs R script to produce gene body average tag density plot and RPKM distribution histogram Doesn't fail even when we couldn't produce any plots |
bowtie_aligner |
../tools/bowtie-alignreads.cwl
(CommandLineTool)
|
Tool maps input raw reads files to reference genome using Bowtie. |
|
group_isoforms |
../tools/group-isoforms.cwl
(CommandLineTool)
|
Tool runs get_gene_n_tss.R script to group isoforms by gene and common TSS |
|
rename_upstream |
../tools/rename.cwl
(CommandLineTool)
|
Tool renames `source_file` to `target_filename`. Input `target_filename` should be set as string. If it's a full path, only basename will be used. If BAI file is present, it will be renamed too |
|
rpkm_calculation |
../tools/geep.cwl
(CommandLineTool)
|
geep |
Tool calculates RPKM values grouped by isoforms or genes. |
rename_downstream |
../tools/rename.cwl
(CommandLineTool)
|
Tool renames `source_file` to `target_filename`. Input `target_filename` should be set as string. If it's a full path, only basename will be used. If BAI file is present, it will be renamed too |
|
get_annotation_gtf |
../tools/ucsc-genepredtogtf.cwl
(CommandLineTool)
|
genePredToGtf - Convert genePred table or file to gtf |
|
get_bam_statistics |
../tools/samtools-stats.cwl
(CommandLineTool)
|
Generates statistics for the input BAM file. |
|
samtools_sort_index |
../tools/samtools-sort-index.cwl
(CommandLineTool)
|
Tool to sort and index input BAM/SAM/CRAM.
If input `trigger` is set to `true` or isn't set at all (`true` is used by default), run `samtools sort` and
`samtools index`, return sorted BAM and BAI/CSI index file.
If input `trigger` is set to `false`, return unchanged `sort_input` (BAM/SAM/CRAM) and index (BAI/CSI, if provided in
`secondaryFiles`) files. |
|
bam_to_bigwig_upstream |
../tools/bam-bedgraph-bigwig.cwl
(Workflow)
|
Workflow converts input BAM file into bigWig and bedGraph files. |
|
extract_fastq_upstream |
../tools/extract-fastq.cwl
(CommandLineTool)
|
Tool to decompress input FASTQ file(s). If several FASTQ files are provided, they will be concatenated in the order that corresponds to files in input. Bash script's logic: - disable case sensitive glob check - check if root name of input file already include '.fastq' or '.fq' extension. If yes, set DEFAULT_EXT to \"\", otherwise use '.fastq' - check file type, decompress if needed - return 1, if file type is not recognized This script also works of input file doesn't have any extension at all |
|
bam_to_bigwig_downstream |
../tools/bam-bedgraph-bigwig.cwl
(Workflow)
|
Workflow converts input BAM file into bigWig and bedGraph files. |
|
extract_fastq_downstream |
../tools/extract-fastq.cwl
(CommandLineTool)
|
Tool to decompress input FASTQ file(s). If several FASTQ files are provided, they will be concatenated in the order that corresponds to files in input. Bash script's logic: - disable case sensitive glob check - check if root name of input file already include '.fastq' or '.fq' extension. If yes, set DEFAULT_EXT to \"\", otherwise use '.fastq' - check file type, decompress if needed - return 1, if file type is not recognized This script also works of input file doesn't have any extension at all |
|
htseq_count_gene_expression |
../tools/htseq-count.cwl
(CommandLineTool)
|
HTSeq: Analysing high-throughput sequencing data |
For convenience to use in the workflow that sort and index BAM files by coordinate
this tools expects coordinate sorted and indexed BAM file as input. For single-read
dat it won't influence on anything, for paired-end the more memory will be used to
keep reads while looking for their proper pairs (see --max-reads-in-buffer parameter). |
fastx_quality_stats_upstream |
../tools/fastx-quality-stats.cwl
(CommandLineTool)
|
Tool calculates statistics on the base of FASTQ file quality scores. If `output_filename` is not provided call function `default_output_filename` to return default output file name generated as `input_file` basename + `.fastxstat` extension. |
|
fastx_quality_stats_downstream |
../tools/fastx-quality-stats.cwl
(CommandLineTool)
|
Tool calculates statistics on the base of FASTQ file quality scores. If `output_filename` is not provided call function `default_output_filename` to return default output file name generated as `input_file` basename + `.fastxstat` extension. |
Outputs
ID | Type | Label | Doc |
---|---|---|---|
bowtie_log | File [Textual format] | Bowtie alignment log |
Bowtie alignment log file |
rpkm_genes | File [TSV] | RPKM, grouped by gene name |
Calculated rpkm values, grouped by gene name |
bambai_pair | File [BAM] | Coordinate sorted BAM alignment file (+index BAI) |
Coordinate sorted BAM file and BAI index file |
star_sj_log | File (Optional) [Textual format] | STAR sj log |
STAR SJ.out.tab |
get_stat_log | File (Optional) [YAML] | YAML formatted combined log |
YAML formatted combined log |
star_out_log | File (Optional) [Textual format] | STAR log out |
STAR Log.out |
rpkm_isoforms | File [CSV] | RPKM, grouped by isoforms |
Calculated rpkm values, grouped by isoforms |
star_final_log | File [Textual format] | STAR final log |
STAR Log.final.out |
bigwig_upstream | File [bigWig] | BigWig file |
Generated BigWig file |
rpkm_common_tss | File [TSV] | RPKM, grouped by common TSS |
Calculated rpkm values, grouped by common TSS |
star_stdout_log | File (Optional) [Textual format] | STAR stdout log |
STAR Log.std.out |
gene_body_report | File (Optional) [TSV] | Gene body average tag density plot for all isoforms longer than 1000 bp |
Gene body average tag density plot for all isoforms longer than 1000 bp in TSV format |
bigwig_downstream | File [bigWig] | BigWig file |
Generated BigWig file |
get_stat_markdown | File (Optional) [TIDE TXT] | Markdown formatted combined log |
Markdown formatted combined log |
star_progress_log | File (Optional) [Textual format] | STAR progress log |
STAR Log.progress.out |
gene_body_plot_pdf | File (Optional) [PDF] | Gene body average tag density plot for all isoforms longer than 1000 bp |
Gene body average tag density plot for all isoforms longer than 1000 bp in PDF format |
insert_size_report | File [TSV] | Insert size distribution report |
Insert size distribution report (right after alignment and sorting) |
get_formatted_stats | File (Optional) [Textual format] | BioWardrobe compatible log |
Processed and combined Bowtie & STAR aligner and GEEP logs |
trim_report_upstream | File | TrimGalore report FASTQ 1 |
TrimGalore generated log for FASTQ 1 |
bam_statistics_report | File [Textual format] | BAM statistics report |
BAM statistics report (right after alignment and sorting) |
htseq_count_stderr_log | File [Textual format] | HTSeq: stderr log |
HTSeq: stderr log |
htseq_count_stdout_log | File [Textual format] | HTSeq: stdout log |
HTSeq: stdout log |
trim_report_downstream | File | TrimGalore report FASTQ 2 |
TrimGalore generated log for FASTQ 2 |
fastx_statistics_upstream | File [Textual format] | FASTQ 1 statistics |
fastx_quality_stats generated FASTQ 1 quality statistics file |
rpkm_distribution_plot_pdf | File (Optional) [PDF] | RPKM distribution plot for isoforms |
RPKM distribution plot for isoforms in PDF format |
fastx_statistics_downstream | File [Textual format] | FASTQ 2 statistics |
fastx_quality_stats generated FASTQ 2 quality statistics file |
htseq_count_gene_expression_file | File [TSV] | HTSeq: read counts grouped by gene_id |
HTSeq: read counts grouped by gene_id |
https://w3id.org/cwl/view/git/935a78f1aff757f977de4e3672aefead3b23606b/workflows/trim-rnaseq-pe-dutp.cwl