Git Product home page Git Product logo

nf-core / tfactivity Goto Github PK

View Code? Open in Web Editor NEW
8.0 168.0 1.0 7.18 MB

Bioinformatics pipeline that makes use of expression and open chromatin data to identify differentially active transcription factors across conditions.

Home Page: https://nf-co.re/tfactivity

License: MIT License

HTML 10.20% R 11.57% Python 18.61% Nextflow 57.02% JavaScript 2.19% CSS 0.34% Shell 0.07%
nextflow nf-core open-chromatin-regions pipeline transcription-factors transcriptomics workflow

tfactivity's Introduction

nf-core/tfactivity

GitHub Actions CI Status GitHub Actions Linting StatusAWS CICite with Zenodo nf-test

Nextflow run with conda run with docker run with singularity Launch on Seqera Platform

Get help on SlackFollow on TwitterFollow on MastodonWatch on YouTube

Introduction

nf-core/tfactivity is a bioinformatics pipeline that can identify the most differentially active transcription factors (TFs) between multiple conditions. It takes a count matrix and open chromatin data (ATAC-seq, DNase-seq, HM-ChIP-seq) as input. It produces a ranking of transcription factors.

Metro map

  1. Identify accessible regions (can perform footprinting between close ChIP-seq peaks or take ATAC-seq peaks)
  2. Calculate affinity scores for combinations of transcription factors and target genes (TGs) using STARE
  3. Identify differentially expressed genes between conditions
  4. Utilize linear regression to identify the transcription factors that are most likely to be responsible for the differential gene expression
  5. Calculate the TF-TG score based on:
    1. Differential expression of the target genes
    2. Affinity of the transcription factors to the target genes
    3. The regression coefficient of the transcription factors
  6. Perform a Mann-Whitney U test and create a ranking of the transcription factors

A more biological visualization of the workflow can be found here:

Note

The following image was created for the TF-Prioritizer publication. Parts of the workflow have been adapted for the nf-core pipeline, but the general idea is still valid.

TF-Prioritizer workflow

Usage

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.

The pipeline supports processing of previously called peaks from ATAC-seq, DNase-seq, or histone modification ChIP-seq data. The peaks can then either be used as-is or be subjected to footprinting analysis. Additionally, BAM files can be provided in a separate samplesheet, which will be used to predict enhancer regions.

sample,condition,assay,peak_file
condition1_H3K27ac_1,condition1,H3K27ac,condition1_H3K27ac_1.broadPeak
condition1_H3K27ac_2,condition1,H3K27ac,condition1_H3K27ac_2.broadPeak
condition1_H3K4me3,condition1,H3K4me3,condition1_H3K4me3.broadPeak
condition2_H3K27ac,condition2,H3K27ac,condition2_H3K27ac.broadPeak
condition3_H3K27ac,condition3,H3K27ac,condition3_H3K27ac.broadPeak
condition3_H3K4me3,condition3,H3K4me3,condition3_H3K4me3.broadPeak

Each row represents a peak file. The sample column should contain a unique identifier for each peak file. The peak_file column should contain the path to the peak file. Peak files need to be in a format that is compatible with the bed format. Only the first three columns of the bed format are used.

sample,condition,assay,signal,control
condition1_H3K27ac_1,condition1,H3K27ac,condition1_H3K27ac_1.bam,condition1_control.bam
condition1_H3K27ac_2,condition1,H3K27ac,condition1_H3K27ac_2.bam,condition1_control.bam
condition1_H3K4me3,condition1,H3K4me3,condition1_H3K4me3.bam,condition1_control.bam
condition2_H3K27ac,condition2,H3K27ac,condition2_H3K27ac.bam,condition2_control.bam
condition3_H3K27ac,condition3,H3K27ac,condition3_H3K27ac.bam,condition3_control.bam
condition3_H3K4me3,condition3,H3K4me3,condition3_H3K4me3.bam,condition3_control.bam

The first three columns are the same as in the peak file samplesheet. The signal column should contain the path to the signal BAM file. The control column should contain the path to the control BAM file.

Second, you need a raw count matrix (e.g. from nf-core/rnaseq) with gene IDs as rows and samples as columns. You also need a design matrix that specifies the conditions of the samples in the count matrix. The design matrix should look as follows:

sample,condition
sample1,condition1
sample2,condition1
sample3,condition2
sample4,condition3

The sample column should match the columns in the expression matrix. The condition column is needs to match the condition column in the samplesheet. Additionally,batches can be added to the design matrix and will be considered in the differential expression analysis.

:::tip There is an alternative way of providing expression values. Instead of providing a single count matrix for all samples, you can provide a gene list and one count file per sample. Details can be found in the usage documentation. :::

Now, you can run the pipeline using:

nextflow run nf-core/tfactivity \
   -profile <docker/singularity/.../institute> \
   --input samplesheet.csv \
   --genome GRCh38 \
   --counts <EXPRESSION_MATRIX> \
   --counts_design design_matrix.csv \
   --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 and further functionality, please refer to the usage documentation and the parameter documentation.

Pipeline output

To see the results of an example test run with a full size dataset refer to the results tab on the nf-core website pipeline page. For more details about the output files and reports, please refer to the output documentation.

Credits

nf-core/tfactivity was originally written by Nico Trummer.

We thank the following people for their extensive assistance in the development of this pipeline:

Contributions and Support

If you would like to contribute to this pipeline, please see the contributing guidelines.

For further information or help, don't hesitate to get in touch on the Slack #tfactivity channel (you can join with this invite).

Citations

TF-Prioritizer: a Java pipeline to prioritize condition-specific transcription factors

Markus Hoffmann, Nico Trummer, Leon Schwartz, Jakub Jankowski, Hye Kyung Lee, Lina-Liv Willruth, Olga Lazareva, Kevin Yuan, Nina Baumgarten, Florian Schmidt, Jan Baumbach, Marcel H Schulz, David B Blumenthal, Lothar Hennighausen & Markus List

GigaScience, Volume 12, 2023, giad026, https://doi.org/10.1093/gigascience/giad026

An extensive list of references for the tools used by the pipeline can be found in the CITATIONS.md file.

You can cite the nf-core publication as follows:

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.

tfactivity's People

Contributors

leonhafner avatar nf-core-bot avatar nictru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

latchbio-nfcore

tfactivity's Issues

Add more supported PWM formats

Description of feature

Currently only the PSEM (Position-specific energy motif) format is supported, which is not widely used. With the following conversion steps we could accept the more popular JASPAR and transfac formats and convert them into the PSEM and MEME format as needed. The MEME format will be necessary for SNEEP

Tasks

Replace ROSE with bedtools

Description of feature

As commented in #5, we should check if it is possible to remove the ROSE codebase of 620 lines and replace it by some bedtools processes.

          @LeonHafner we should investigate if we can replace this with a sequence of `bedtools` commands, which would reduce the amount of code drastically

Originally posted by @nictru in #5 (comment)

Error while parsing gtf

Description of the bug

Hello,

I am getting the follwoing error when i run tf activity pipeline

Command output:
[1] "Reading genes.gtf elements of type gene"
[1] "Found 0 features"

Command error:
[1] "Reading genes.gtf elements of type gene"
[1] "Found 0 features"
gene_id is not a valid field

I am using Rat ensembl GTF.
Another issue is I am not able to use narrowPeak files. I had to rename them to broadPeak in order to process them.

Command used and terminal output

nextflow run nfcore/pipelines/tfactivity/dev/workflow \
            --input samplesheet.csv \
            --outdir ./results \
            -profile  singularity \
            --counts hisat.counts_for_tfactivity.csv \
            --counts_design rnaseq_design.csv \
            -config genome.config \
            --genome rat-ensembl-rn6-r102 \
            --taxon_id 10116

Relevant files

No response

System information

No response

Installation issues

Description of the bug

TF activity- https://github.com/nf-core/tfactivity
Pulling singularity images ━━━━━━━━━━━━━━━━━━━━━━━━━━━╺━━ 90% • 18/20 completed
biocontainers/stare… FATAL: While making image from oci registry: error fetc…
CRITICAL The container "biocontainers/stare-abc:1.0.4--haf6292c_1" is
unavailable.
WARNING: Couldn't use cached digest for registry: HEAD
https://index.docker.io/v2/biocontainers/stare-abc/manifests/1.0.4--haf
6292c_1: unexpected status code 401 Unauthorized (HEAD responses have
no body, use GET for details)
WARNING: Falling back to direct digest.
FATAL: While making image from oci registry: error fetching image to
cache: failed to get checksum for
docker://biocontainers/stare-abc:1.0.4--haf6292c_1: GET
https://index.docker.io/v2/biocontainers/stare-abc/manifests/1.0.4--haf
6292c_1: UNAUTHORIZED: authentication required; [map[Action:pull Class:
Name:biocontainers/stare-abc Type:repository]]

Command used and terminal output

No response

Relevant files

No response

System information

Nextflow version - 23.04.1
nf-core version: 2.7.2
Ubuntu 22.04.4 LTS (GNU/Linux 6.5.0-28-generic x86_64)
nf-core tfactivity - dev version

Run fimo per condition and assay

Description of feature

Currently, FIMO is executed a single time for the merged candidate regions across all conditions and assays. This reduces the resolution that we can utilize for the report (since we only get a single affinity value per pairing of TF and merged region).

By running FIMO per assay and condition, we get more accurate results.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.