-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmethod.txt
More file actions
18 lines (9 loc) · 3.82 KB
/
Copy pathmethod.txt
File metadata and controls
18 lines (9 loc) · 3.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Sequencing data were processed with a reproducible Nextflow pipeline. The workflow was designed for paired-end FASTQ files and performs sample filtering, optional barcode correction, adapter trimming, alignment, fragment generation, and normalized signal track generation.
Input FASTQ files were identified as paired files matching the pattern *_R1.fq.gz and *_R2.fq.gz. The pipeline supports optional exclusion of samples by filename. By default, files containing the substrings PosCtrl, NegCtrl, Fiducial, PBS, or Undetermined are excluded, although these patterns can be modified or disabled by the user through pipeline parameters.
For libraries requiring barcode correction, FASTQ headers were rewritten using a Well-ID barcode matrix. This step replaces the terminal s7/s5 barcode combination in the read header with the corresponding Well-ID from a user-supplied CSV file containing the columns PAGE-1-s7, PAGE-1-s5, PAGE-2-s7, PAGE-2-s5, and Well-ID. All four valid PAGE-1/PAGE-2 s7/s5 combinations are recognized. The rewrite stage is implemented with a compiled C++ helper for performance, with the original Python implementation retained as a fallback. Barcode rewriting can be disabled if the FASTQ headers have already been corrected. An optional suffix can also be appended to the assigned Well-ID.
Adapter trimming was performed with Cutadapt using paired-end mode, a minimum read length of 20 bases, and the adapter sequence CTGTCTCTTATACACATCT applied to both read 1 and read 2. The trimming step uses 8 CPU cores by default.
Trimmed read pairs were aligned to a user-specified Bowtie2 reference index with Bowtie2 v2-style very-sensitive local alignment parameters. The alignment command used the options --very-sensitive-local, --soft-clipped-unmapped-tlen, --no-mixed, --no-discordant, --dovetail, --phred33, -I 10, and -X 1000. Alignment was configured with 16 CPU cores, 256 GB memory, and an 18 hour wall-time limit by default.
Alignment output in SAM format was converted to BAM with Samtools. BAM files were then converted to paired-end BED fragments with Bedtools bamtobed -bedpe. Fragment records were reformatted to retain genomic coordinates and barcode-derived identifiers, sorted, collapsed to unique fragments, and written as BED files. The resulting BED files were compressed with bgzip.
Normalized coverage tracks were generated from the compressed BED files. Total fragment coverage was first calculated as the summed fragment length across all BED intervals. A per-sample scaling factor was then computed as (1 / total_coverage) x 10^10. Bedtools genomecov was used with the -bg option to generate scaled BedGraph coverage using a user-specified chromosome sizes file, and UCSC bedGraphToBigWig was used to convert the BedGraph output to BigWig format.
The principal user-configurable parameters in the pipeline are: input_dir, specifying the input FASTQ directory; out_dir, specifying the output directory; barcode_matrix, specifying the Well-ID mapping CSV; barcode_suffix, specifying an optional suffix appended during barcode rewriting; skip_barcode_rewrite, disabling header correction when not needed; enable_sample_filter, enabling or disabling filename-based exclusion; skip_patterns, specifying custom exclusion patterns; adapter_seq, specifying the adapter sequence for trimming; ref, specifying the Bowtie2 index basename; chrom_sizes, specifying the chromosome sizes file required for coverage generation; publish_mode, controlling how Nextflow publishes outputs; conda_env, specifying the Conda environment file; and singularity_image, specifying the Singularity or Apptainer image path.
By default, the pipeline publishes intermediate and final outputs into structured subdirectories under the selected output directory, including rewritten FASTQ files, trimmed FASTQ files, SAM files, BAM files, compressed BED files, and BigWig files.