Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed config.yaml and uncorrupted bam files #9

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions Snakefile
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ minCoverage = leafcutterOpt["minCoverage"]
isChimera = "hpc.mssm.edu" in socket.getfqdn()

# not sure if this works when running in serial on interactive node
if isChimera:
shell.prefix('export PS1="";source activate snakemake;ml R/3.6.0;')
#if isChimera:
# shell.prefix('export PS1="";source activate snakemake;ml R/3.6.0;')
#else:
#shell.prefix('conda activate leafcutterpipeline;')

Expand Down Expand Up @@ -156,11 +156,11 @@ rule extractJunctions:
output:
'junctions/{samples}' + juncSuffix
shell:
#"samtools index {input};" redundant if indexes are present
#"regtools junctions extract -a 8 -m 50 -M 500000 -s {stranded} -o {output} {input}"
"samtools index {input};" # redundant if indexes are present
"regtools junctions extract -a 8 -i 50 -I 500000 -s {stranded} -o {output} {input.bam}"
# conda version of regtools uses i and I instead of m and M
"ml regtools/0.5.1; "
"regtools junctions extract -a 8 -m 50 -M 500000 -s {stranded} -o {output} {input.bam}"
# "ml regtools/0.5.1; "
# "regtools junctions extract -a 8 -m 50 -M 500000 -s {stranded} -o {output} {input.bam}"


# remove weird contigs that cause add_chr() to break by adding "chr" to normal chr names
Expand Down Expand Up @@ -246,7 +246,7 @@ rule junctionQC:
params:
script = "scripts/cluster_QC.R"
shell:
"ml R/3.6.0; "
#"ml R/3.6.0; "
"Rscript {params.script} "
"--outFolder {outFolder} "
"--dataCode {dataCode} "
Expand Down Expand Up @@ -284,7 +284,7 @@ rule leafcutterDS:
params:
n_threads = leafcutterOpt['n_threads']
shell:
'ml R/3.6.0; '
#'ml R/3.6.0; '
'Rscript {leafcutterPath}/scripts/leafcutter_ds.R '
' --output_prefix {outFolder}{wildcards.contrast}/{dataCode}_{wildcards.contrast} '
' --num_threads {params.n_threads} '
Expand Down Expand Up @@ -313,7 +313,7 @@ rule getTerminalExons:
input:
refFolder + refFile
params:
gtftogenepred= "/sc/arion/projects/ad-omics/data/software/UCSC/gtfToGenePred",
gtftogenepred= "gtfToGenePred",
genepredtobed = "scripts/genepred_to_bed.py",
get_regions = "scripts/create_regions_from_gencode.R",
outFolder = refFolder + refCode + "/"
Expand All @@ -326,7 +326,7 @@ rule getTerminalExons:
"{params.gtftogenepred} {input} {output.genepred};"
"python {params.genepredtobed} --first_exon {output.genepred} > {output.starts} ; "
"python {params.genepredtobed} --last_exon {output.genepred} > {output.ends}; "
"mkdir {params.outFolder}; "
"mkdir -p {params.outFolder}; "
"Rscript {params.get_regions} {input} {params.outFolder}"

# prepare results for shiny visualisation
Expand Down
10 changes: 6 additions & 4 deletions example/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,11 @@ stranded: 0

# cluster using regtools junctions or STAR-like junctions
# regtools or rapid

clusterRegtools: True
junctionQC: False

leafcutterPath: '/hpc/users/humphj04/software/leafcutter'
leafcutterPath: '/app/leafcutter'

leafcutter:
# clustering options
Expand All @@ -58,7 +60,7 @@ leafcutter:
python3Path: 'python3'
python2Path: 'python2'

refFolder: "/sc/arion/projects/ad-omics/data/references/hg38_reference/GENCODE/"
refFile: "gencode.v30.annotation.gtf.gz"
refCode: "gencode_hg38_v30"
refFolder: "/app/reference/"
refFile: "gencode.v38.annotation.gtf.gz"
refCode: "gencode_hg38_v38"

Binary file modified example/data/TDP43_knockdown_1_unique_kcnq2.bam
Binary file not shown.
Binary file modified example/data/TDP43_knockdown_2_unique_kcnq2.bam
Binary file not shown.
Binary file modified example/data/TDP43_knockdown_3_unique_kcnq2.bam
Binary file not shown.
Binary file modified example/data/control_scramble_1_unique_kcnq2.bam
Binary file not shown.
Binary file modified example/data/control_scramble_2_unique_kcnq2.bam
Binary file not shown.
Binary file modified example/data/control_scramble_3_unique_kcnq2.bam
Binary file not shown.
2 changes: 1 addition & 1 deletion example/run_snakemake.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
#ml R
# this version of R has the current version of leafcutter

snakemake -s ../Snakefile --configfile config.yaml
snakemake -c1 -s ../Snakefile --configfile config.yaml