Skip to content

Commit

Permalink
gene names were partially parsed before data, this is wrong
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsebfischer committed Oct 29, 2018
1 parent dbd5a74 commit 697f8e0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions diffxpy/testing/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -1775,8 +1775,8 @@ def lrt(
if reduced_formula_scale is None:
reduced_formula_scale = reduced_formula

X = _parse_data(data, gene_names)
gene_names = _parse_gene_names(data, gene_names)
X = _parse_data(data, gene_names)
sample_description = _parse_sample_description(data, sample_description)
size_factors = _parse_size_factors(size_factors=size_factors, data=X)

Expand Down Expand Up @@ -1948,8 +1948,8 @@ def wald(
coef_to_test = [coef_to_test]

# # Parse input data formats:
X = _parse_data(data, gene_names)
gene_names = _parse_gene_names(data, gene_names)
X = _parse_data(data, gene_names)
if dmat_loc is None and dmat_scale is None:
sample_description = _parse_sample_description(data, sample_description)
size_factors = _parse_size_factors(size_factors=size_factors, data=X)
Expand Down Expand Up @@ -2203,8 +2203,8 @@ def two_sample(
raise ValueError('base.two_sample(): Do not specify `noise_model` if using test t-test or wilcoxon: ' +
'The t-test is based on a gaussian noise model and wilcoxon is model free.')

X = _parse_data(data, gene_names)
gene_names = _parse_gene_names(data, gene_names)
X = _parse_data(data, gene_names)
grouping = _parse_grouping(data, sample_description, grouping)
sample_description = pd.DataFrame({"grouping": grouping})

Expand Down Expand Up @@ -2389,8 +2389,8 @@ def pairwise(

# Do not store all models but only p-value and q-value matrix:
# genes x groups x groups
X = _parse_data(data, gene_names)
gene_names = _parse_gene_names(data, gene_names)
X = _parse_data(data, gene_names)
sample_description = _parse_sample_description(data, sample_description)
grouping = _parse_grouping(data, sample_description, grouping)
sample_description = pd.DataFrame({"grouping": grouping})
Expand Down Expand Up @@ -2593,8 +2593,8 @@ def versus_rest(

# Do not store all models but only p-value and q-value matrix:
# genes x groups
X = _parse_data(data, gene_names)
gene_names = _parse_gene_names(data, gene_names)
X = _parse_data(data, gene_names)
sample_description = _parse_sample_description(data, sample_description)
grouping = _parse_grouping(data, sample_description, grouping)
sample_description = pd.DataFrame({"grouping": grouping})
Expand Down

0 comments on commit 697f8e0

Please sign in to comment.