Coder Social home page Coder Social logo

wf-rbp-motif's Introduction

Workflow for Preforming Motif Analysis of RNA Binding Proteins

This repo contains a WDL workflow and a Snakemake workflow to perform comprehensive RNA protein binding motif analysis (including motif discovery) on sequences, by wrapping xstreme method in the MEME suite.

The primary inputs include

  1. a BED6+ file containing the target regions and
  2. a reference FASTA file

Users has the option to provide a pre-defined motif database, either in the form of a custom MEME database or by using the MEME suite bundled Ray2013 RBP motif database.

The default configuration looks like:

{
    "species": "human",  # used to translate species scientific name
    "genome": {
        "url": "__placeholder__",  # in case `local` file does not exist
        "local": "resources/genome.fasta.gz",  # reference fasta
    },
    "scan_region": {  # define the motif scan region
        "upstream": [0, 0],  # upstream of the target exon
        "downstream": [1, 500],  # downstream of the target exon
    },
    "db": "",  # if empty use internal RBP motif
    "background": "",  # if empty use shuffled sequences
    "dna2rna": False,  # used in *XSTREME* program, indicating that the input DNA sequences will be treated as RNA (treating T as representing U)
}

The included demo intends to replicate the extend figure 2a from Jbara2023.

To run this demo,

docker run --rm \
  -v $PWD:$PWD -w $PWD \
  ghcr.io/ghbore/wf-rbp-motif:latest \
    snakemake -c all -s /wf/jbara.smk

The possible inputs look like:

File bed6
String species_scientific_name = "Homo_sapiens"
File? reference
String? reference_url
Array[Int] upstream = [0, 0]
Array[Int] downstream = [1, 500]
File? custom_motif_db
File? background
Boolean dna2rna = false
String wf_docker = "ghcr.io/ghbore/wf-rbp-motif:latest"
String meme_docker = "ghcr.io/ghbore/wf-rbp-motif:latest"

Most parameters align with those in the Snakemake workflow. Similarly, to replicate the extend figure 2a from Jbara2023, based the intermediate files generated by previous the Snakemake demo run, trigger

#$ tree  # dependent files
# ├── Jbara-nature-2023-extfig2a.bed
# ├── resources/
# │   ├── Jbara-nature-2023-extfig2a.xlsx
# │   ├── hg38.fasta.gz
# │   └── hg38.gff.gz
# ├── results/
# │   ├── Jbara-nature-2023-extfig2a.fasta
# │   ├── Jbara-nature-2023-extfig2a.merged.bed
# │   ├── Jbara-nature-2023-extfig2a.target_exon
# │   ├── xstreme
# │   │   └── Jbara-nature-2023-extfig2a/

docker run --rm \
  -v $PWD:$PWD -w $PWD \
  ghcr.io/ghbore/wf-rbp-motif:latest \
    miniwdl run \
      /wf/workflow/wf-rbp-motif.wdl \
        bed6=Jbara-nature-2023-extfig2a.bed \
        reference=resources/hg38.fasta.gz \
        dna2rna=true

Reference

1. Charles E. Grant and Timothy L. Bailey, "XSTREME: comprehensive motif analysis of biological sequence datasets", BioRxiv, September 3, 2021.

2. Ray D, Kazan H, Cook KB, Weirauch MT, Najafabadi HS, Li X, Gueroussov S, Albu M, Zheng H, Yang A, Na H, Irimia M, Matzat LH, Dale RK, Smith SA, Yarosh CA, Kelly SM, Nabet B, Mecenas D, Li W, Laishram RS, Qiao M, Lipshitz HD, Piano F, Corbett AH, Carstens RP, Frey BJ, Anderson RA, Lynch KW, Penalva LO, Lei EP, Fraser AG, Blencowe BJ, Morris QD, Hughes TR. A compendium of RNA-binding motifs for decoding gene regulation. Nature. 2013 Jul 11;499(7457):172-7. doi: 10.1038/nature12311IF: 64.8 Q1 . PMID: 23846655; PMCID: PMC3929597.

3. Jbara A, Lin KT, Stossel C, Siegfried Z, Shqerat H, Amar-Schwartz A, Elyada E, Mogilevsky M, Raitses-Gurevich M, Johnson JL, Yaron TM, Ovadia O, Jang GH, Danan-Gotthold M, Cantley LC, Levanon EY, Gallinger S, Krainer AR, Golan T, Karni R. RBFOX2 modulates a metastatic signature of alternative splicing in pancreatic cancer. Nature. 2023 May;617(7959):147-153. doi: 10.1038/s41586-023-05820-3. Epub 2023 Mar 22. PMID: 36949200; PMCID: PMC10156590.

wf-rbp-motif's People

Contributors

ghbore avatar

Watchers

 avatar

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.