Skip to content
Snippets Groups Projects
Commit 5dbb01e7 authored by Rachel  LEGENDRE's avatar Rachel LEGENDRE
Browse files

Update Snakefile

parent cd67015f
No related branches found
No related tags found
No related merge requests found
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
######################################################################### #########################################################################
import pandas as pd import pandas as pd
from fnmatch import fnmatch from fnmatch import fnmatch
from re import sub, match from re import sub, match
...@@ -40,9 +41,6 @@ RULES = os.path.join("workflow", "rules") ...@@ -40,9 +41,6 @@ RULES = os.path.join("workflow", "rules")
# list of all files in the directory 'input_dir' # list of all files in the directory 'input_dir'
filenames = [f for f in os.listdir(config["input_dir"]) if match(r'.*'+config["input_readtag"]+config["input_extension"]+'', f)] filenames = [f for f in os.listdir(config["input_dir"]) if match(r'.*'+config["input_readtag"]+config["input_extension"]+'', f)]
samples = [sub(config["input_readtag"]+config["input_extension"], '', file) for file in filenames]
receptor = [ x.strip() for x in (config["design"]["receptor"]).split(",")]
conds = [ x.strip() for x in (config["design"]["condition"]).split(",")]
#------------------------------------------------------- #-------------------------------------------------------
...@@ -118,9 +116,6 @@ else: ...@@ -118,9 +116,6 @@ else:
__adapters__output = __input_data __adapters__output = __input_data
## Indexing genome ## Indexing genome
ref = [ config["genome"]["name"] ] ref = [ config["genome"]["name"] ]
...@@ -165,33 +160,6 @@ expected_output.extend(expand(__bowtie2_mapping__sort, SAMPLE=samples, REF=ref)) ...@@ -165,33 +160,6 @@ expected_output.extend(expand(__bowtie2_mapping__sort, SAMPLE=samples, REF=ref))
include: os.path.join(RULES, "bowtie2_mapping.rules") include: os.path.join(RULES, "bowtie2_mapping.rules")
# then we performed peak calling only in files against reference genome and not spike genome !
ref = config["genome"]["name"]
# Genome coverage for plus and minus strand
strand = ["minus", "plus"]
__genomecov__input = "02-Mapping/{{SAMPLE}}_{}_sort.bam".format(ref)
__genomecov__logs = "03-Coverage/logs/{SAMPLE}_{STRAND}_coverage.out"
__genomecov__output = "03-Coverage/{SAMPLE}_{STRAND}_coverage.csv"
__genomecov__genome = config["genome"]["fasta_file"]
__genomecov__options = ""
expected_output.extend(expand(__genomecov__output, SAMPLE=samples, STRAND=strand))
include: os.path.join(RULES, "genomecov.rules")
# RNAsig R script
__rnasig__target = "config/design_strand.txt"
__rnasig__output_dir = "."
__rnasig__covdir = "03-Coverage/"
__rnasig__gfffile = config['genome']['gff_file']
__rnasig__report = "04-RNAsig/finalplot.pdf"
__rnasig__logs_out = "04-RNAsig/logs/rnasig.out"
__rnasig__logs_err = "04-RNAsig/logs/rnasig.err"
expected_output.extend([__rnasig__report])
include: os.path.join(RULES, "rnasig.rules")
# Multiqc rule # Multiqc rule
config['multiqc']['options'] += " -c config/multiqc_config.yaml" config['multiqc']['options'] += " -c config/multiqc_config.yaml"
...@@ -206,7 +174,7 @@ expected_output = [__multiqc__output] ...@@ -206,7 +174,7 @@ expected_output = [__multiqc__output]
include: os.path.join(RULES, "multiqc.rules") include: os.path.join(RULES, "multiqc.rules")
rule rnasig: rule rnaflow:
input: expected_output input: expected_output
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment