- Luca Ducoli (@lducoli)
If you simply want to use this workflow, download and extract the latest release. If you intend to modify and further extend this workflow or want to work under version control, fork this repository as outlined in Advanced.
Clone this repositiory into a new directory
$ git clone [email protected]:lducoli/irclip-rnp-snakemake my-irclip-rnp-experiment
$ cd my-irclip-rnp-experiment
Create and activate the conda environment
$ conda env create -q -f=envs/conda.yaml -n irclip-rnp-snakemake
$ conda activate irclip-rnp-snakemake
Install DEP2 R package and check the package is loading properly
$ R -e 'devtools::install_github("mildpiggy/DEP2")'
$ R -e 'library(DEP2)'
Run the snakemake on test data. These are HNRNPC irCLIP-RNP datasets from two gel sections included in the original irCLIP-RNP paper (PMID: ).
$ snakemake -j1 --directory test
Examine the outputs of the workflow in the directory test/outs/. Check the file HNRNPC_DEP2_results.txt you should see 140 total proteins. If you filter the column noUV_high_vs_UVC_high_significant for only TRUE values you should get 45 signficant proteins.
Copy the ProteinGroups.txt output files from MaxQuant in a new data folder and rename it by adding the name of your RBP(s) of interest: RBP1_ProteinGroups.txt, RBP2_ProteinGroups.txt, etc.
Create a samplesheet in the main folder based on the template at example/samples.csv. Configure the workflow using the file config.yaml.
Ensure the correct conda environment is active with
$ conda activate irclip-rnp-snakemake
Test your configuration by performing a dry-run via
$ snakemake -n
Execute the workflow locally via
$ snakemake --cores $N
using $N cores or run it in a cluster environment via
$ snakemake --jobs $N --cluster qsub
For SLURM, you'll need to generate a .profile
$snakemake --jobs $N --profile slurm --cluster-config cluster.json
If you installed the workflow by cloning the github repo, you can pull latest updates to workflow with
$ git pull --rebase
This will require you to first commit any changes you made to your configuration file before pulling new updates.
Then simply rerun the snakemake command.
The following recipe provides established best practices for running and extending this workflow in a reproducible way.
- Fork the repo to a personal or lab account.
- Clone the fork to the desired working directory for the concrete project/run on your machine.
- Create a new branch (the project-branch) within the clone and switch to it. The branch will contain any project-specific modifications (e.g. to configuration, but also to code).
- Modify the config, and any necessary sheets (and probably the workflow) as needed.
- Commit any changes and push the project-branch to your fork on github.
- Run the analysis.
- Optional: Merge back any valuable and generalizable changes to the upstream repo via a pull request. This would be greatly appreciated.
- Optional: Push results (plots/tables) to the remote branch on your fork.
- Optional: Create a self-contained workflow archive for publication along with the paper (snakemake --archive).
- Optional: Delete the local clone/workdir to free space.