Skip to content
Snippets Groups Projects
Commit a5daeb29 authored by Blaise Li's avatar Blaise Li
Browse files

Switch to newer rpy2.

Interface seems to have changed. There may still be missing changes.
parent e95c85b9
No related branches found
No related tags found
No related merge requests found
......@@ -1198,7 +1198,7 @@ rule merge_bigwig_reps:
from rpy2.robjects import Formula, StrVector
from rpy2.rinterface import RRuntimeError
#from rpy2.rinterface import RRuntimeError
rule differential_expression:
input:
counts_table = source_counts,
......@@ -1227,7 +1227,8 @@ rule differential_expression:
contrast = StrVector(["lib", cond, ref])
formula = Formula("~ lib")
res, size_factors = do_deseq2(COND_NAMES, CONDITIONS, counts_data, formula=formula, contrast=contrast)
except RRuntimeError as e:
#except RRuntimeError as e:
except RuntimeError as e:
warnings.warn(
"Probably not enough usable data points to perform DESeq2 analyses:\n%s\nSkipping %s_%s_%s" % (
str(e), wildcards.contrast, wildcards.orientation, wildcards.biotype))
......
......@@ -1733,7 +1733,7 @@ rule compute_RPM_folds:
from rpy2.robjects import Formula, StrVector
from rpy2.rinterface import RRuntimeError
#from rpy2.rinterface import RRuntimeError
rule differential_expression:
input:
counts_table = source_counts,
......@@ -1769,7 +1769,8 @@ rule differential_expression:
contrast = StrVector(["lib", cond, ref])
try:
res, size_factors = do_deseq2(COND_NAMES, CONDITIONS, counts_data, formula=formula, contrast=contrast)
except RRuntimeError as e:
#except RRuntimeError as e:
except RuntimeError as e:
warnings.warn(
"Probably not enough usable data points to perform DESeq2 analyses:\n%s\nSkipping %s_%s_%s" % (
str(e), wildcards.contrast, wildcards.orientation, wildcards.biotype))
......
......@@ -1052,7 +1052,7 @@ rule gather_read_counts_summaries:
from rpy2.robjects import Formula, StrVector
from rpy2.rinterface import RRuntimeError
#from rpy2.rinterface import RRuntimeError
rule differential_expression:
input:
counts_table = source_counts,
......@@ -1092,7 +1092,8 @@ rule differential_expression:
contrast = StrVector(["lib", cond, ref])
try:
res, size_factors = do_deseq2(COND_NAMES, CONDITIONS, counts_data, formula=formula, contrast=contrast)
except RRuntimeError as e:
#except RRuntimeError as e:
except RuntimeError as e:
warnings.warn(
"Probably not enough usable data points to perform DESeq2 analyses:\n%s\nSkipping %s_%s_%s_%s" % (
str(e), wildcards.read_type, wildcards.contrast, wildcards.orientation, wildcards.biotype))
......@@ -2575,7 +2576,7 @@ def plot_counts_scatters(counts_and_res, cols):
###################################################
from rpy2.robjects import Formula, StrVector
from rpy2.rinterface import RRuntimeError
#from rpy2.rinterface import RRuntimeError
rule small_RNA_differential_expression:
input:
counts_table = source_counts,
......@@ -2611,7 +2612,8 @@ rule small_RNA_differential_expression:
# raise NotImplementedError("Unknown contrast: %s" % wildcards.contrast)
try:
res, size_factors = do_deseq2(COND_NAMES, CONDITIONS, counts_data, formula=formula, contrast=contrast)
except RRuntimeError as e:
#except RRuntimeError as e:
except RuntimeError as e:
warn(
"Probably not enough usable data points to perform DESeq2 analyses:\n%s\nSkipping %s_%s_%s" % (
str(e), wildcards.contrast, wildcards.orientation, wildcards.small_type))
......
......@@ -3636,7 +3636,7 @@ def plot_counts_scatters(counts_and_res, cols):
###################################################
from rpy2.robjects import Formula, StrVector
from rpy2.rinterface import RRuntimeError
#from rpy2.rinterface import RRuntimeError
rule small_RNA_differential_expression:
input:
counts_table = source_small_RNA_counts,
......@@ -3668,7 +3668,8 @@ rule small_RNA_differential_expression:
contrast = StrVector(["lib", cond, ref])
try:
res, size_factors = do_deseq2(COND_NAMES, CONDITIONS, counts_data, formula=formula, contrast=contrast)
except RRuntimeError as e:
#except RRuntimeError as e:
except RuntimeError as e:
warn(
"Probably not enough usable data points to perform DESeq2 analyses:\n%s\nSkipping %s_%s_%s" % (
str(e), wildcards.contrast, wildcards.orientation, wildcards.small_type))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment