Skip to content

Commit

Permalink
update to call UniverSC module nf-core/modules#1706
Browse files Browse the repository at this point in the history
  • Loading branch information
TomKellyGenetics committed Feb 27, 2023
1 parent 120f8bb commit 3c21d5a
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 30 deletions.
16 changes: 10 additions & 6 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,27 @@ if(params.aligner == "cellranger") {

if(params.aligner == "universc") {
process {
withName: UNIVERSC_MKGTF {
publishDir = { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" }

withName: CELLRANGER_MKGTF {
publishDir = [
path: "${params.outdir}/${params.aligner}/mkgtf",
path: "${params.outdir}/cellranger/mkgtf",
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
ext.args = "--attribute=gene_biotype:protein_coding --attribute=gene_biotype:lncRNA --attribute=gene_biotype:pseudogene"
container = "nfcore/universc:1.2.5.1"
}
withName: UNIVERSC_MKREF {
withName: CELLRANGER_MKREF {
publishDir = [
path: "${params.outdir}/${params.aligner}/mkref",
path: "${params.outdir}/cellranger/mkref",
mode: params.publish_dir_mode
]
container = "nfcore/universc:1.2.5.1"
}
withName: UNIVERSC_LAUNCH {
withName: UNIVERSC {
publishDir = [
path: "${params.outdir}/${params.aligner}/launch",
path: "${params.outdir}/universc",
mode: params.publish_dir_mode
]
}
Expand Down
12 changes: 2 additions & 10 deletions modules.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,9 @@
"branch": "master",
"git_sha": "5e34754d42cd2d5d248ca8673c0a53cdf5624905"
},
"universc/launch": {
"universc": {
"branch": "master",
"git_sha": "acc63a2bc7a3fe83bf5733e099348c5b694c0fd7"
},
"universc/mkgtf": {
"branch": "master",
"git_sha": "acc63a2bc7a3fe83bf5733e099348c5b694c0fd7"
},
"universc/mkref": {
"branch": "master",
"git_sha": "acc63a2bc7a3fe83bf5733e099348c5b694c0fd7"
"git_sha": "7a522f4ba5b97368c975b314db25929f6931648d"
},
"custom/dumpsoftwareversions": {
"branch": "master",
Expand Down
26 changes: 13 additions & 13 deletions subworkflows/local/align_universc.nf
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/*
* Alignment with Cellranger
* Alignment with Cellranger open-source implementation called by UniverSC
*/

include {UNIVERSC_MKGTF} from "../../modules/nf-core/universc/mkgtf/main.nf"
include {UNIVERSC_MKREF} from "../../modules/nf-core/universc/mkref/main.nf"
include {UNIVERSC_LAUNCH} from "../../modules/nf-core/universc/launch/main.nf"
include {MTX_TO_H5AD } from "../../modules/local/mtx_to_h5ad.nf"
include {CELLRANGER_MKGTF} from "../../modules/nf-core/universc/mkgtf/main.nf"
include {CELLRANGER_MKREF} from "../../modules/nf-core/universc/mkref/main.nf"
include {UNIVERSC} from "../../modules/nf-core/universc/main.nf"
include {MTX_TO_H5AD} from "../../modules/local/mtx_to_h5ad.nf"

// Define workflow to subset and index a genome region fasta file
workflow UNIVERSC_ALIGN {
Expand All @@ -24,24 +24,24 @@ workflow UNIVERSC_ALIGN {

if (!universc_index) {
// Filter GTF based on gene biotypes passed in params.modules
UNIVERSC_MKGTF( gtf )
ch_versions = ch_versions.mix(UNIVERSC_MKGTF.out.versions)
CELLRANGER_MKGTF( gtf )
ch_versions = ch_versions.mix(CELLRANGER_MKGTF.out.versions)

// Make reference genome
UNIVERSC_MKREF( fasta, UNIVERSC_MKGTF.out.gtf, "cellranger_reference" )
ch_versions = ch_versions.mix(UNIVERSC_MKREF.out.versions)
universc_index = UNIVERSC_MKREF.out.reference
CELLRANGER_MKREF( fasta, CELLRANGER_MKGTF.out.gtf, "cellranger_reference" )
ch_versions = ch_versions.mix(CELLRANGER_MKREF.out.versions)
universc_index = CELLRANGER_MKREF.out.reference
}

// Obtain read counts
UNIVERSC_LAUNCH (
UNIVERSC (
// TODO add technology and chemistry input parameters and set defaults
ch_fastq.map{ meta, reads -> [meta + ["id": meta.id, "samples:", meta.id, "technology": universc_technology, "single_end:", false, "strandedness:", 'forward'], reads] },
universc_index
)
ch_versions = ch_versions.mix(UNIVERSC_LAUNCH.out.versions)
ch_versions = ch_versions.mix(UNIVERSC.out.versions)

emit:
ch_versions
universc_out = UNIVERSC_LAUNCH.out.outs
universc_out = UNIVERSC.out.outs
}
2 changes: 1 addition & 1 deletion workflows/scrnaseq.nf
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ include { KALLISTO_BUSTOOLS } from '../subworkflows/local/kallisto_bustools'
include { SCRNASEQ_ALEVIN } from '../subworkflows/local/alevin'
include { STARSOLO } from '../subworkflows/local/starsolo'
include { CELLRANGER_ALIGN } from "../subworkflows/local/align_cellranger"
include { UNIVERSC_ALIGN } from "../subworkflows/local/align_universc"
include { UNIVERSC_ALIGN } from "../subworkflows/local/align_universc"
include { MTX_CONVERSION } from "../subworkflows/local/mtx_conversion"
include { GTF_GENE_FILTER } from '../modules/local/gtf_gene_filter'
/*
Expand Down

0 comments on commit 3c21d5a

Please sign in to comment.