Skip to content
 
 

Repository files navigation

basic-sequence-collector

Lifecycle: WIP Contributions welcome License: GPL3 minimal Python version: 3.0 Package Version = 0.0.1 Last-changedate

A collector for FASTQ files from Illumina (single- and paired-end short reads) or Nanopore (long read) NGS for downstream processing. Built upon previous work at ProvLab1.

Table of Contents

Quick-Start Guide

conda activate basic-sequence-collector
nextflow run pipelines/basic-sequence-collector \
  --folder </path/to/inputdir> | --samplesheet </path/to/samplesheet> \
  --outdir </path/to/output> \
  --label <>

Dependencies

Conda is required to build the basic-sequence-collector environment with the necessary workflow dependencies. To create the environment:

conda env create -f ./environments/environment.yml

Arguments

--input: Either a folder containing FASTQ files, or a sample sheet specifying FASTQ files/directories corresponding to a sample. See Input.
--outdir: The output directory. See Output.
--label: The label to output directory. See Output. Default is 'raw'.
--prefix: A prefix to attach to the FASTQ file. Default is ''.
--suffix: A suffix to attach to the FASTQ file. Default is ''.

Input:

Formats for folders and sample sheets in --input must be as follows:

Folder

For a typical sequencing run, only the run folder needs to be specified as the FASTQ files will be searched for automatically. The file format must be as follows:

  • Illumina: Paired reads are assumed and must use the default Illumina nomenclature of {SampleName}_S#_L001_R#_001.fastq.gz. The script will search for R1 and R2, and assign sample names as SampleName_S1.
  • Nanopore: Accepts single or split FASTQ files, and must use the default Nanopore nomenclature of {FlowCellID}_pass_barcode##_{random}[_#].fastq.gz. Files containing the same barcode and terminated with _# will be automatically concatenated. Sample name will be assigned as barcode##.
Sample sheet

For more complicated runs, such as samples with both Illumina and Nanopore reads, a CSV file can specify an ID and list of reads. Each read must be in .fastq or .fastq.gz format, and paired reads are accepted for Illumina runs in illumina1 and illumina2. Multiple files or directories can be specified in each field. If directories, the search criteria specified in --folder will be used. These files will be concatenated and converted to fastq.gz if necessary.

For example:

ID,         illumina1,                  illumina2,                  nanopore
SAMPLE-01   ,/path/to/SAMPLE-01.fq      ,                           ,
SAMPLE-02   ,/path/to/SAMPLE-02_R1.fq   ,/path/to/SAMPLE-02_R2.fq   , 
SAMPLE-03   ,                           ,                           ,/path/to/SAMPLE-03.fq/

Output

The output file structure is determined by the outdir:

<outdir>
   ├── pipeline_info
   │      ├── samplesheet.csv
   │      └── software_versions.yml
   └── <label>
          ├── samplesheet.csv
          └── fastq
                 └── [prefix_]<ID>[_suffix]_{R1|R2|ONT}.fastq[.gz]

Pipeline Usage

To use this module in a Nextflow pipeline, copy \modules\local\basic-sequence-collector.nf into the same directory of a Nextflow project. It can be called by:

include { BASIC_SEQUENCE_COLLECTOR as COLLECT } from './modules/local/basic-sequence-collector.nf'

COLLECT(params.input, params.outdir, "raw"[, prefix, suffix])

samplesheet = COLLECT.out.samplesheet // a path() channel

References

  1. Provlab-Bioinfo/pathogenseq: Pathogen whole genome sequence (WGS) data analysis pipeline. https://github.com/provlab-bioinfo/pathogenseq

About

Collector for FASTQ files for downstream pipelines at APL

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages