Welcome! This repository contains Nextflow workflows and helper scripts used to recreate figures and genome browser (GBiB) files from our paper "Fiber-TEnCATS reveals haplotype-specific chromatin accessibility and DNA methylation at human L1HS loci"
There is a total of 4 main workflows in the workflows subdirecory and each of them has associated .confg file in the config subdirectory:
- process_FiberTEnCATS_reads.nf - for figures and GBiB files related to Fiber-TEnCATS reads in our trio data
- FiberTEnCATS_on_hg38.nf - for figures related to Fiber-TEnCATS comparisons to ATAC-seq and Fiber-seq data
- process_Iso_seq_reads.nf - for figures and GBiB files related to HG002 and HG004 publically awailable Iso-seq data
- analyze_5mC_in_Plat_Pedigree.nf - for figures related to Platinum Pedigree WGS 5mCpG analysis
You will need:
- Nextflow (version 23.04.1)
- Conda or Mamba
- Input files described in paper and config files modified to point to where those files are on your machine
- Several external tools that are not automatically installed by the workflows, listed below
Most software dependencies are handled through the conda environment files in envs/. These environments can either be created automatically by Nextflow or created manually ahead of time for reuse.
A few tools should be installed separately and added to the relevant config files.
Please install:
After installing these tools, please edit the relevant config for the workflow you want to run to include paths to your installations.
You will need the following data used in the paper:
- Indexed fasta files for all genomes used in the paper: T1T HG002 (maternal and paternal haplotypes), patched HG003 and HG004 genomes, and GRCh38.
- GRCh38 gene annotations (v47)
- Fiber-TEnCATS unaligned bam files for HG002, HG003 and HG004
- Iso-seq and short-read RNA-seq data for HG002 and HG004
- Platinum Pedigree PacBio HiFi data, assembly-based vcf files per cell line, and long-read-based merged vcf file
- ENCODE GM12878 ATAC-seq peak regions
- RepeatMasker annotations of all genomes.
- Chain files between HG002 haplotypes and betweeen all trio genomes and GRCh38 Please modify .config files in the config sudirectory to point to appropiate files/directories on your machine.
RepeatMasker annotations can be generated with the folllowing command: RepeatMasker -pa 4 -s human genome.fa For RepeatMasker installation please refer to: https://www.repeatmasker.org/RepeatMasker/
Please use the following UCSC "T2T Alignment and Chain Creation" workflow to generate chain files between genomes: https://hgdownload.soe.ucsc.edu/hubs/GCA/009/914/755/GCA_009914755.4/html/GCA_009914755.4_T2T-CHM13v2.0.hgLiftOver.html
Example:
nextflow run workflows/<chosen_workflow.nf> \
-c configs/<chosen_workflow.config> \
-c configs/envs.config \
-with-condaWhere <chosen_workflow.nf> is one of the following: process_FiberTEnCATS_reads.nf, FiberTEnCATS_on_hg38.nf, process_Iso_seq_reads.nf, analyze_5mC_in_Plat_Pedigree.nf
And <chosen_workflow.config> is associated .config file: FiberTEnCATS_nf.config, FiberTEnCATS_on_hg38.config, isoseq_nf.config, Plat_Pedigree.config, with modified paths to point to local input files and installed binaries of previously mentioned external tools
The configs/envs.config points to the .yml files in the envs/ subdirectory. When you run the workflow with this config, Nextflow will create the required conda environments automatically.
After the process_FiberTEnCATS_reads.nf workflow has been run for all cell lines in the trio, the m6A/m5C dotplot and Sankey plot from the paper can be recreated using the corresponding Jupyter notebooks in the scripts subdirectory. You can use conda env created from envs/main_pipeline_env.yml when running these notebook and you'll also need local liftOver installation.
Some steps from the paper were performed with external tools that are not included as part of this pipeline.
- Creating
.chainfiles: To create.chainfiles for liftOver between genome assemblies, please use the UCSC chain file generation workflow. - To identify non-reference L1HS insertions, please use
NanoPal - To create personal patched genomes, please use
GPatch - For initial TE annotation of genomes (these will be polished in out pipeline) please use
RepeatMasker - To augment personal patched genomes with non-reference L1HS insertions, please use
NanoMEI - To identify FIREs in individual reads, please see the Fiber-seq tools:
FIRE(please also see the Methods section for details on how we modified the pre-FDR shuffling approach to identify significant L1HS open promoters)
If you use this repository, please cite:
Fiber-TEnCATS reveals haplotype-specific chromatin accessibility and DNA methylation at human L1HS loci