nanoporetech / pipeline-transcriptome-de

Pipeline for differential gene expression (DGE) and differential transcript usage (DTU) analysis using long reads
Other
106 stars 27 forks source link

de_analysis error: "Error in `contrasts<-`(`*tmp*`, ..." #24

Closed hqs10 closed 3 years ago

hqs10 commented 3 years ago

Dear all, dear @bsipos ,

Please help me to understand how to overcome the following error:

rule de_analysis:
    input: de_analysis/de_params.tsv, de_analysis/coldata.tsv, merged/all_counts.tsv
    output: de_analysis/results_dge.tsv, de_analysis/results_dge.pdf, de_analysis/results_dtu_gene.tsv, de_analysis/results_dtu_transcript.tsv, de_analysis/results_dtu_stageR.tsv, merged/all_counts_filtered.tsv, merged/all_gene_counts.tsv
    jobid: 17

Activating conda environment: /media/localarchive/pipeline-transcriptome-de/Workspaces/pipeline-transcriptome-de/.snakemake/conda/91bf797a
Warning message:
package ‘DRIMSeq’ was built under R version 4.0.3
Warning messages:
1: package ‘GenomicFeatures’ was built under R version 4.0.3
2: package ‘S4Vectors’ was built under R version 4.0.3
3: package ‘IRanges’ was built under R version 4.0.3
4: package ‘GenomeInfoDb’ was built under R version 4.0.3
5: package ‘GenomicRanges’ was built under R version 4.0.3
6: package ‘AnnotationDbi’ was built under R version 4.0.3
7: package ‘Biobase’ was built under R version 4.0.3
Loading counts, conditions and parameters.
Loading annotation database.
Import genomic features from the file as a GRanges object ... OK
Prepare the 'metadata' data frame ... OK
Make the TxDb object ... OK
Warning message:
In .get_cds_IDX(mcols0$type, mcols0$phase) :
  The "phase" metadata column contains non-NA values for features of type
  stop_codon. This information was ignored.
'select()' returned 1:many mapping between keys and columns
Filtering counts using DRIMSeq.
Building model matrix.
Error in `contrasts<-`(`*tmp*`, value = contr.funs[1 + isOF[nn]]) :
  contrasts can be applied only to factors with 2 or more levels
Calls: model.matrix -> model.matrix.default -> contrasts<-
Execution halted
[Tue Nov 24 17:56:17 2020]
Error in rule de_analysis:
    jobid: 17
    output: de_analysis/results_dge.tsv, de_analysis/results_dge.pdf, de_analysis/results_dtu_gene.tsv, de_analysis/results_dtu_transcript.tsv, de_analysis/results_dtu_stageR.tsv, merged/all_counts_filtered.tsv, merged/all_gene_counts.tsv
    conda-env: /media/localarchive/pipeline-transcriptome-de/Workspaces/pipeline-transcriptome-de/.snakemake/conda/91bf797a
    shell:

    /media/localarchive/pipeline-transcriptome-de/scripts/de_analysis.R

        (one of the commands exited with non-zero exit code; note that snakemake uses bash strict mode!)

Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message

I know that is quite similar to #15 but unfortunately it still doesn't help to solve this problem.

hqs10 commented 3 years ago

After re-installing the pipeline and snakemake. This issue has been resolved.