Skip to content

Error when running rosace from dumpling workflow #9

@durr1602

Description

@durr1602

Hi, sorry if this is trivial, but I'm running into some issues when running the dumpling workflow. It appears to be related to the run_rosace script. Here is the error I get:

CalledProcessError in file /project/chlandry/users/rodur28/dumpling/workflow/rules/rosace.smk, line 18:
Command 'set -euo pipefail;  Rscript --vanilla /project/chlandry/users/rodur28/dumpling/.snakemake/scripts/tmpaxrm35zq.run_rosace.R' returned non-zero exit status 1.
[Wed Dec 11 13:11:29 2024]
Error in rule run_rosace:
    jobid: 1
    input: results/benchmark_RD/processed_counts/CN_alp_r1_F1_T0.tsv, results/benchmark_RD/processed_counts/CN_alp_r2_F1_T0.tsv, results/benchmark_RD/processed_counts/CN_alp_r1_F1_T1.tsv, results/benchmark_RD/processed_counts/CN_alp_r2_F1_T1.tsv, results/benchmark_RD/processed_counts/CN_alp_r1_F1_T2.tsv, results/benchmark_RD/processed_counts/CN_alp_r2_F1_T2.tsv
    output: results/benchmark_RD/rosace/scores_cond_A.tsv
    log: logs/benchmark_RD/rosace/benchmark_RD.rosace.log (check log file(s) for error details)

Traceback (most recent call last):
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/bin/enrich_cmd", line 8, in <module>
    sys.exit(main_cmd())
             ~~~~~~~~^^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/enrich2/main.py", line 232, in main_cmd
    obj.calculate()
    ~~~~~~~~~~~~~^^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/enrich2/experiment.py", line 159, in calculate
    self.calc_counts(label)
    ~~~~~~~~~~~~~~~~^^^^^^^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/enrich2/experiment.py", line 254, in calc_counts
    data[(cnd.name, sel.name, "c_{}".format(tp))] = sel_data[
    ~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/frame.py", line 4311, in __setitem__
    self._set_item(key, value)
    ~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/frame.py", line 4524, in _set_item
    value, refs = self._sanitize_column(value)
                  ~~~~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/frame.py", line 5263, in _sanitize_column
    return _reindex_for_setitem(value, self.index)
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/frame.py", line 12692, in _reindex_for_setitem
    raise err
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/frame.py", line 12687, in _reindex_for_setitem
    reindexed_value = value.reindex(index)._values
                      ~~~~~~~~~~~~~^^^^^^^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/series.py", line 5153, in reindex
    return super().reindex(
           ~~~~~~~~~~~~~~~^
        index=index,
        ^^^^^^^^^^^^
    ...<5 lines>...
        tolerance=tolerance,
        ^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/generic.py", line 5610, in reindex
    return self._reindex_axes(
           ~~~~~~~~~~~~~~~~~~^
        axes, level, limit, tolerance, method, fill_value, copy
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    ).__finalize__(self, method="reindex")
    ^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/generic.py", line 5633, in _reindex_axes
    new_index, indexer = ax.reindex(
                         ~~~~~~~~~~^
        labels, level=level, limit=limit, tolerance=tolerance, method=method
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
  File "/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/pandas/core/indexes/base.py", line 4429, in reindex
    raise ValueError("cannot reindex on an axis with duplicate labels")
ValueError: cannot reindex on an axis with duplicate labels
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_rep2_T1_lib.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_rep1_T2_lib.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_rep2_T2_lib.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/benchmark_RD_exp.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_R1_sel.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_R2_sel.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_rep1_T0_lib.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_rep2_T0_lib.h5
  warnings.warn(UnclosedFileWarning(msg))
/project/chlandry/users/rodur28/dumpling/.snakemake/conda/67d2d89bb9799e59a640f480438207d3_/lib/python3.13/site-packages/tables/file.py:114: UnclosedFileWarning: Closing remaining open file: results/benchmark_RD/enrich/cond_A_rep1_T1_lib.h5
  warnings.warn(UnclosedFileWarning(msg))

Most importantly, here is the log from rosace:

Attaching package: ‘dplyr’

The following objects are masked from ‘package:stats’:

    filter, lag

The following objects are masked from ‘package:base’:

    intersect, setdiff, setequal, union

This is cmdstanr version 0.8.0
- CmdStanR documentation and vignettes: mc-stan.org/cmdstanr
- CmdStan path: /home/rodur28/.cmdstan/cmdstan-2.35.0
- CmdStan version: 2.35.0

A newer version of CmdStan is available. See ?install_cmdstan() to install it.
To disable this check set option or environment variable cmdstanr_no_ver_check=TRUE.
Rows: 8 Columns: 6
── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: ","
chr (3): sample, condition, file
dbl (3): replicate, time, tile

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Warning message:
In dir.create(rosace_assayset_dir, recursive = TRUE) :
  './results/benchmark_RD/rosace/assayset' already exists
Rows: 2271 Columns: 2
── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: "\t"
chr (1): hgvs
dbl (1): count

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Joining with `by = join_by(hgvs)`
Rows: 2271 Columns: 2
── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: "\t"
chr (1): hgvs
dbl (1): count

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Joining with `by = join_by(hgvs)`
Rows: 2271 Columns: 2
── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
Delimiter: "\t"
chr (1): hgvs
dbl (1): count

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
Joining with `by = join_by(hgvs)`
Error in CreateAssayObject(counts = as.matrix(counts[2:ncol(counts)]),  :
  Length of variant names is not equal to number of rows in input matrix
In addition: Warning messages:
1: In full_join(counts, count) :
  Detected an unexpected many-to-many relationship between `x` and `y`.
ℹ Row 3 of `x` matches multiple rows in `y`.
ℹ Row 3 of `y` matches multiple rows in `x`.
ℹ If a many-to-many relationship is expected, set `relationship = "many-to-many"` to silence this warning.
2: In full_join(counts, count) :
  Detected an unexpected many-to-many relationship between `x` and `y`.
ℹ Row 3 of `x` matches multiple rows in `y`.
ℹ Row 3 of `y` matches multiple rows in `x`.
ℹ If a many-to-many relationship is expected, set `relationship = "many-to-many"` to silence this warning.
Execution halted

I though this might be related to the specification of coordinates in the config file (which I'm guessing should corroborate the list of variants) but I double checked that and it should be OK. I don't really know what's going on :/.

thanks for the help, much appreciated!

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions