Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

single_sample_scrublet with different resolution parameters returns a loom file with only clustering for the last resolution listed[BUG] #303

Open
cbravo93 opened this issue Feb 9, 2021 · 0 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@cbravo93
Copy link

cbravo93 commented Feb 9, 2021

Describe the bug
single_sample_scrublet with different resolution parameters returns a loom file with only clustering for the last resolution listed

To Reproduce
Steps to reproduce the behavior:

  1. Configure with these options:
singularity {
   cacheDir = '/ddn1/vol1/staging/leuven/stg_00002/lcb/lcb_projects/Pipeline_Dev/containers/'
   enabled = true
   autoMounts = true
   runOptions = '-B /ddn1/vol1/staging/leuven/stg_00002/,/staging/leuven/stg_00002/'
}

manifest {
   name = 'vib-singlecell-nf/vsn-pipelines'
   description = 'A repository of pipelines for single-cell data in Nextflow DSL2'
   homePage = 'https://github.com/vib-singlecell-nf/vsn-pipelines'
   version = '0.24.0'
   mainScript = 'main.nf'
   defaultBranch = 'master'
   nextflowVersion = '!20.04.1'
}

params {
   global {
      project_name = 'snRNA_Liver_Fresh_Mouse_5_Multiome_NST'
      outdir = 'out'
      species = 'mouse'
      genome {
         assembly = 'mm10'
      }
   }
   misc {
      test {
         enabled = false
      }
   }
   utils {
      container = 'vibsinglecellnf/utils:0.3.0'
      publish {
         compressionLevel = 6
         annotateWithBatchVariableName = false
      }
   }
   sc {
      file_converter {
         off = 'h5ad'
         tagCellWithSampleId = true
         useFilteredMatrix = true
         makeVarIndexUnique = false
      }
      scanpy {
         container = 'vibsinglecellnf/scanpy:0.5.2'
         report {
            annotations_to_plot = []
         }
         feature_selection {
            report_ipynb = '/src/scanpy/bin/reports/sc_select_variable_genes_report.ipynb'
            method = 'mean_disp_plot'
            minMean = 0.0125
            maxMean = 3
            minDisp = 0.5
            off = 'h5ad'
         }
         feature_scaling {
            method = 'zscore_scale'
            maxSD = 10
            off = 'h5ad'
         }
         neighborhood_graph {
            off = 'h5ad'
         }
         dim_reduction {
            report_ipynb = '/src/scanpy/bin/reports/sc_dim_reduction_report.ipynb'
            pca {
               method = 'pca'
               off = 'h5ad'
            }
            umap {
               method = 'umap'
               off = 'h5ad'
            }
            tsne {
               method = 'tsne'
               off = 'h5ad'
            }
         }
         clustering {
            preflight_checks = true
            report_ipynb = '/src/scanpy/bin/reports/sc_clustering_report.ipynb'
            method = 'leiden'
            resolutions = [0.4, 0.6, 0.8]
            off = 'h5ad'
         }
         marker_genes {
            method = 'wilcoxon'
            ngenes = 0
            groupby = 'leiden'
            off = 'h5ad'
         }
         filter {
            report_ipynb = '/src/scanpy/bin/reports/sc_filter_qc_report.ipynb'
            cellFilterStrategy = 'fixedthresholds'
            cellFilterMinNGenes = 350
            cellFilterMaxNGenes = 4000
            cellFilterMaxPercentMito = 0.05
            geneFilterMinNCells = 3
            off = 'h5ad'
            outdir = 'out'
         }
         data_transformation {
            method = 'log1p'
            off = 'h5ad'
         }
         normalization {
            method = 'cpx'
            countsPerCellAfter = 10000
            off = 'h5ad'
         }
      }
      scope {
         genome = 'mm10'
         tree {
            level_1 = 'VSN-pipeline'
            level_2 = 'Individual_samples'
            level_3 = ''
         }
      }
      scrublet {
         container = 'vibsinglecellnf/scrublet:0.1.4'
         doublet_detection {
            report_ipynb = '/src/scrublet/bin/reports/sc_doublet_detection_report.ipynb'
            useVariableFeatures = 'False'
            technology = '10x'
            off = 'h5ad'
         }
         cell_annotate {
            off = 'h5ad'
            method = 'obo'
            indexColumnName = 'index'
         }
         cell_filter {
            off = 'h5ad'
            method = 'internal'
            filters = [[id:'NO_DOUBLETS', sampleColumnName:'sample_id', filterColumnName:'scrublet__predicted_doublets', valuesToKeepFromFilterColumn:['False']]]
         }
      }
   }
   data {
      tenx {
         cellranger_mex = '/staging/leuven/stg_00002/lcb/lcb_projects/TEW/Multiome/cellranger_arc/TEW__ebb273__b33e6f__Multiome_Liver_CTRL_NSTprotocol/outs/'
      }
   }
   pcacv {
      container = 'vibsinglecellnf/pcacv:0.2.0'
      find_optimal_npcs {
         accessor = '@assays$RNA@scale.data'
      }
   }
}

process {
   executor = 'local'
   withLabel:'compute_resources__.*|compute_resources__default' {
      cpus = 2
      memory = '60 GB'
      time = '1h'
      clusterOptions = '-A lp_symbiosis'
   }
   withLabel:compute_resources__minimal {
      cpus = 1
      memory = '1 GB'
   }
   withLabel:compute_resources__mem {
      cpus = 4
      memory = '60 GB'
   }
   withLabel:compute_resources__cpu {
      cpus = 10
      memory = '60 GB'
   }
   withLabel:compute_resources__report {
      maxForks = 2
      cpus = 1
      memory = '60 GB'
   }
   withLabel:compute_resources__24hqueue {
      time = '24h'
   }
      withLabel:compute_resources__pcacv {
      cpus = 5
   }
}

timeline {
   enabled = true
   file = 'out/nextflow_reports/execution_timeline.html'
}

report {
   enabled = true
   file = 'out/nextflow_reports/execution_report.html'
}

trace {
   enabled = true
   file = 'out/nextflow_reports/execution_trace.txt'
}

dag {
   enabled = true
   file = 'out/nextflow_reports/pipeline_dag.svg'
}

min {
   enabled = false
}
  1. Run using this entry point:
nextflow -C single_sample_scrublet.config run vib-singlecell-nf/vsn-pipelines -entry single_sample_scrublet
  1. See error:
No error produced when running the pipeline. However, when checking the clusterings in the loom file there are only clusters for resolution 0.8 [no 0.4 nor 0.6]. All resolutions are computed though, and I have the corresponding notebooks.

Expected behavior
A loom file with all cluster resolutions, as I get with single_sample or single_sample_scenic. Normally I run single_sample_scrublet and single_sample_scenic and then append the scrublet results to the single_sample_scenic loom.

Please complete the following information:

  • OS: [e.g. Ubuntu]
  • Nextflow Version: [e.g. 20.04.1]
  • vsn-pipelines Version: [e.g. 0.24.0]
@cbravo93 cbravo93 added the bug Something isn't working label Feb 9, 2021
@dweemx dweemx self-assigned this Feb 15, 2021
dweemx added a commit that referenced this issue Feb 15, 2021
@dweemx dweemx added this to the 0.26.0 milestone Mar 22, 2021
@dweemx dweemx closed this as completed Jul 1, 2021
@dweemx dweemx reopened this Jul 9, 2021
@dweemx dweemx modified the milestones: 0.26.0, 0.27.0 Jul 9, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants