shahcompbio/bamkallisto is a bioinformatics pipeline that converts transcriptome-aligned BAM files to FASTQ and quantifies transcript expression using kallisto. It is designed for quantify expression in short-read RNAseq data against custom transcriptome references (e.g., ONT-derived assemblies) starting from existing transcriptome BAM files.
The pipeline performs the following steps:
- Convert transcriptome BAMs to paired-end FASTQs (
samtools collate/fastq) - Read QC (
FastQC) - Pseudoalignment and transcript quantification (
kallisto quant) - Gene-level summarization via tximport
- Aggregate QC report (
MultiQC)
samplesheet.csv
|
[parse samplesheet]
|
SAMTOOLS_COLLATEFASTQ (per sample)
|
FASTQC ──────────────────────┐
| |
KALLISTO_QUANT (per sample) |
| |
results/{sample}/ |
abundance.tsv |
abundance.h5 |
run_info.json |
|
MULTIQC ◄────────────────────┘
|
multiqc_report.html
Note
If you are new to Nextflow and nf-core, please refer to this page on how to set-up Nextflow. Make sure to test your setup with -profile test before running the workflow on actual data.
First, prepare a samplesheet with your input data that looks as follows:
samplesheet.csv:
sample,transcriptome_bam
SAMPLE_1,/path/to/sample1.Aligned.toTranscriptome.out.bam
SAMPLE_2,/path/to/sample2.Aligned.toTranscriptome.out.bamEach row represents a transcriptome-aligned BAM file for one sample.
Now, you can run the pipeline using:
# With a pre-built kallisto index
nextflow run shahcompbio/bamkallisto \
-profile <docker/singularity> \
--input samplesheet.csv \
--transcripts_index /path/to/kallisto/index \
--outdir <OUTDIR>
# With a transcriptome FASTA (index will be built automatically)
nextflow run shahcompbio/bamkallisto \
-profile <docker/singularity> \
--input samplesheet.csv \
--transcripts_fasta /path/to/transcriptome.fasta \
--outdir <OUTDIR>
# With a GTF + genome FASTA (cDNA extraction + indexing)
nextflow run shahcompbio/bamkallisto \
-profile <docker/singularity> \
--input samplesheet.csv \
--gtf /path/to/annotation.gtf \
--genome_fasta /path/to/genome.fasta \
--outdir <OUTDIR>Warning
Please provide pipeline parameters via the CLI or Nextflow -params-file option. Custom config files including those provided by the -c Nextflow option can be used to provide any configuration except for parameters; see docs.
For more details, see the usage documentation and the output documentation.
| Parameter | Description | Default |
|---|---|---|
--input |
Path to samplesheet CSV | required |
--transcripts_index |
Path to pre-built kallisto index | - |
--transcripts_fasta |
Path to transcriptome FASTA (builds index) | - |
--gtf |
Path to GTF annotation (used with --genome_fasta) |
- |
--genome_fasta |
Path to genome FASTA (used with --gtf) |
- |
--outdir |
Output directory | required |
--skip_fastqc |
Skip FastQC step | false |
--pseudo_aligner |
Pseudoaligner to use ('kallisto' or 'salmon') | kallisto |
--gtf_id_attribute |
Gene ID attribute in GTF | gene_id |
--gtf_extra_attribute |
Extra gene attribute in GTF | gene_name |
--kallisto_quant_fraglen |
Estimated fragment length (single-end mode) | 200 |
--kallisto_quant_fraglen_sd |
Fragment length standard deviation (single-end mode) | 200 |
--extra_kallisto_quant_args |
Extra args for kallisto (e.g., '-b 100') | -b 100 |
One of --transcripts_index, --transcripts_fasta, or --gtf + --genome_fasta must be provided.
shahcompbio/bamkallisto was originally written by Asher Preska Steinberg.
If you would like to contribute to this pipeline, please see the contributing guidelines.
An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.
This pipeline uses code and infrastructure developed and maintained by the nf-core community, reused here under the MIT license.
The nf-core framework for community-curated bioinformatics pipelines.
Philip Ewels, Alexander Peltzer, Sven Fillinger, Harshil Patel, Johannes Alneberg, Andreas Wilm, Maxime Ulysse Garcia, Paolo Di Tommaso & Sven Nahnsen.
Nat Biotechnol. 2020 Feb 13. doi: 10.1038/s41587-020-0439-x.