Skip to content

Commit

Permalink
Test profile setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Riley-Grindle committed Sep 19, 2024
1 parent 0bb5101 commit 90a7ca9
Show file tree
Hide file tree
Showing 38 changed files with 150 additions and 108 deletions.
8 changes: 5 additions & 3 deletions assets/samplesheet.csv
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
sample,fastq_1,fastq_2
SAMPLE_PAIRED_END,/path/to/fastq/files/AEG588A1_S1_L002_R1_001.fastq.gz,/path/to/fastq/files/AEG588A1_S1_L002_R2_001.fastq.gz
SAMPLE_SINGLE_END,/path/to/fastq/files/AEG588A4_S4_L003_R1_001.fastq.gz,
id,data_directory,mt_cc_rm_genes
0dpa,./assets/test_data/0dpa/,./auxillaryGeneFiles/danioRerio.aux.features.csv
1dpa,./assets/test_data/1dpa/,./auxillaryGeneFiles/danioRerio.aux.features.csv
2dpa,./assets/test_data/2dpa/,./auxillaryGeneFiles/danioRerio.aux.features.csv
4dpa,./assets/test_data/4dpa/,./auxillaryGeneFiles/danioRerio.aux.features.csv
37 changes: 37 additions & 0 deletions assets/segmentation.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
id,kidney,spleen,lungs,all
Old_O1_kidney_88w_rep1,true,false,false,true
Old_O1_lung_88w_rep1,false,false,true,true
Old_O1_lung_88w_rep2,false,false,true,true
Old_O1_spleen_88w_rep1,false,true,false,true
Old_O1_spleen_88w_rep2,false,true,false,true
Old_O2_kidney_91w_rep1,true,false,false,true
Old_O2_kidney_91w_rep2,true,false,false,true
Old_O2_lung_91w_rep1,false,false,true,true
Old_O2_lung_91w_rep2,false,false,true,true
Old_O2_spleen_91w_rep1,false,true,false,true
Old_O2_spleen_91w_rep2,false,true,false,true
Old_O3_kidney_93w_rep1,true,false,false,true
Old_O3_lung_93w_rep1,false,false,true,true
Old_O3_spleen_93w_rep1,false,true,false,true
Old_O3_spleen_93w_rep2,false,true,false,true
Young_Y1_kidney_29w_rep1,true,false,false,true
Young_Y1_kidney_29w_rep2,true,false,false,true
Young_Y1_spleen_29w_rep1,false,true,false,true
Young_Y3_kidney_31w_rep1,true,false,false,true
Young_Y3_kidney_31w_rep2,true,false,false,true
Young_Y3_lung_31w_rep1,false,false,true,true
Young_Y3_lung_31w_rep2,false,false,true,true
Young_Y3_spleen_31w_rep1,false,true,false,true
Young_Y3_spleen_31w_rep2,false,true,false,true
Young_Y4_kidney_34w_rep1,true,false,false,true
Young_Y4_kidney_34w_rep2,true,false,false,true
Young_Y4_lung_34w_rep1,false,false,true,true
Young_Y4_lung_34w_rep2,false,false,true,true
Young_Y4_spleen_34w_rep1,false,true,false,true
Young_Y4_spleen_34w_rep2,false,true,false,true
Young_Y5_kidney_34w_rep1,true,false,false,true
Young_Y5_kidney_34w_rep2,true,false,false,true
Young_Y5_lung_34w_rep1,false,false,true,true
Young_Y5_lung_34w_rep2,false,false,true,true
Young_Y5_spleen_34w_rep1,false,true,false,true
Young_Y5_spleen_34w_rep2,false,true,false,true
Binary file added assets/test_data/0dpa/barcodes.tsv.gz
Binary file not shown.
Binary file added assets/test_data/0dpa/features.tsv.gz
Binary file not shown.
Binary file added assets/test_data/0dpa/matrix.mtx.gz
Binary file not shown.
Binary file added assets/test_data/1dpa/barcodes.tsv.gz
Binary file not shown.
Binary file added assets/test_data/1dpa/features.tsv.gz
Binary file not shown.
Binary file added assets/test_data/1dpa/matrix.mtx.gz
Binary file not shown.
Binary file added assets/test_data/2dpa/barcodes.tsv.gz
Binary file not shown.
Binary file added assets/test_data/2dpa/features.tsv.gz
Binary file not shown.
Binary file added assets/test_data/2dpa/matrix.mtx.gz
Binary file not shown.
Binary file added assets/test_data/4dpa/barcodes.tsv.gz
Binary file not shown.
Binary file added assets/test_data/4dpa/features.tsv.gz
Binary file not shown.
Binary file added assets/test_data/4dpa/matrix.mtx.gz
Binary file not shown.
36 changes: 30 additions & 6 deletions conf/test.config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
Defines input files and everything required to run a fast and simple pipeline test.
Use as follows:
nextflow run nf-core/scscape -profile test,<docker/singularity> --outdir <OUTDIR>
nextflow run nf-core/scscape -profile test<docker/singularity> --outdir <OUTDIR>
----------------------------------------------------------------------------------------
*/
Expand All @@ -14,16 +14,40 @@ params {
config_profile_name = 'Test profile'
config_profile_description = 'Minimal test dataset to check pipeline function'


segmentation_sheet = "${projectDir}/assets/segmentation.csv"
gene_identifier = "gene_name"
min_cells = 3
min_features = 200

nfeature_lower = 10
nfeature_upper = 0
ncount_lower = 10
ncount_upper = 0
max_mito_pct = 10

vars_2_regress = "nCount_RNA,nFeature_RNA,percent.mt,S.Score,G2M.Score"

features_2_scale = "VF"
scale_method = "SCT"

pcMax = null

integration_method = Harmony

resolutions = "0.05,0.1,0.3,0.5,0.7,0.9,1.2,1.5"

makeLoupe = true
eula_agreement = "Agree"

// Limit resources so that this can run on GitHub Actions
max_cpus = 2
max_memory = '6.GB'
max_cpus = 4
max_memory = '10.GB'
max_time = '6.h'

// Input data
// TODO nf-core: Specify the paths to your test data on nf-core/test-datasets
// TODO nf-core: Give any required params for the test so that command line flags are not needed
input = 'https://raw.githubusercontent.com/nf-core/test-datasets/viralrecon/samplesheet/samplesheet_test_illumina_amplicon.csv'
input = "${projectDir}/assets/samplesheet.csv"

// Genome references
genome = 'R64-1-1'
}
File renamed without changes.
File renamed without changes.
74 changes: 0 additions & 74 deletions modules/local/feature_naming.nf

This file was deleted.

45 changes: 45 additions & 0 deletions modules/local/feature_naming/feature_naming.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
process FEATURE_NAMING {

tag "${meta.id}"
label 'process_low'

conda "conda-forge::python=3.9.5"
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
'https://depot.galaxyproject.org/singularity/python:3.9--1' :
'quay.io/rgrindle/convert_gn_nms:latest' }"

input:
tuple val(meta), path(sample_files)
tuple val(meta), path(gene_list)

output:
tuple val(meta), path (sample_files), path ("AuxGeneList.csv"), emit: data
path("versions.yml"), emit: versions

when:
task.ext.when == null || task.ext.when

script:
"""
while true; do
sleep 1
done
convert.py ${sample_files}/features.tsv.gz $gene_list
cat <<-END_VERSIONS > versions.yml
"${task.process}":
BASH: \$(echo \$(bash --version) )
END_VERSIONS
"""

stub:
"""
cat <<-END_VERSIONS > versions.yml
"${task.process}":
BASH: \$(echo \$(bash --version) )
END_VERSIONS
"""

}

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions segmentation.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id,00_dpa,04_dpa,all
00_dpa_1,true,false,true
00_dpa_2,true,false,true
04_dpa_1,false,true,true
04_dpa_2,false,true,true
id,early,late,all
0dpa,true,false,true
1dpa,true,false,true
2dpa,false,true,true
4dpa,false,true,true
2 changes: 1 addition & 1 deletion subworkflows/local/input_check.nf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Check input samplesheet and get read channels
//

include { SAMPLESHEET_CHECK } from '../../modules/local/samplesheet_check'
include { SAMPLESHEET_CHECK } from '../../modules/local/samplesheet_check/samplesheet_check'

workflow INPUT_CHECK {
take:
Expand Down
46 changes: 27 additions & 19 deletions workflows/scscape.nf
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ ch_multiqc_custom_methods_description = params.multiqc_methods_description ? fil
// SUBWORKFLOW: Consisting of a mix of local and nf-core/modules
//
include { INPUT_CHECK } from '../subworkflows/local/input_check'
include { MAKE_SEURAT } from '../modules/local/makeseurat.nf'
include { NORMALIZE_QC } from '../modules/local/normalize_qc.nf'
include { FIND_DOUBLETS } from '../modules/local/doubletfinder.nf'
include { MERGE_SO } from '../modules/local/merge.nf'
include { MERGE_SO as SCALE_SO } from '../modules/local/merge.nf'
include { RUN_PCA as PCA_MULT } from '../modules/local/runpca.nf'
include { RUN_PCA as PCA_SING } from '../modules/local/runpca.nf'
include { INTEGRATION } from '../modules/local/integration.nf'
include { FIND_NN_CLUSTER } from '../modules/local/find_NN_clusters.nf'
include { DISPLAY_REDUCTION } from '../modules/local/plotting.nf'
include { GZIP } from '../modules/local/gzip.nf'
include { FEATURE_NAMING } from '../modules/local/feature_naming.nf'
include { MAKE_SEURAT } from '../modules/local/makeseurat/makeseurat.nf'
include { NORMALIZE_QC } from '../modules/local/normalize_qc/normalize_qc.nf'
include { FIND_DOUBLETS } from '../modules/local/doubletfinder/doubletfinder.nf'
include { MERGE_SO } from '../modules/local/merge/merge.nf'
include { MERGE_SO as SCALE_SO } from '../modules/local/merge/merge.nf'
include { RUN_PCA as PCA_MULT } from '../modules/local/runpca/runpca.nf'
include { RUN_PCA as PCA_SING } from '../modules/local/runpca/runpca.nf'
include { INTEGRATION } from '../modules/local/integration/integration.nf'
include { FIND_NN_CLUSTER } from '../modules/local/find_NN_clusters/find_NN_clusters.nf'
include { DISPLAY_REDUCTION } from '../modules/local/plotting/plotting.nf'
include { GZIP } from '../modules/local/gzip/gzip.nf'
include { FEATURE_NAMING } from '../modules/local/feature_naming/feature_naming.nf'

/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -135,18 +135,26 @@ workflow SCSCAPE {
ch_updated_meta.map { [ it[0], it[1] ] },
ch_updated_meta.map { [ it[0], it[2] ] }
)
}


ch_init_rds = MAKE_SEURAT (
ch_init_rds = MAKE_SEURAT (
ch_updated_features.data.map{ [ it[0], it[1] ] },
ch_updated_features.data.map{ [ it[0], it[2] ] },
params.min_cells,
params.min_features,
params.gene_identifier
)
ch_init_rds.rds.join(ch_updated_meta).set { ch_init_rds_meta }
ch_validation_log.mix(ch_init_rds.log).set{ ch_validation_log }
)
ch_init_rds.rds.join(ch_updated_meta).set { ch_init_rds_meta }
ch_validation_log.mix(ch_init_rds.log).set{ ch_validation_log }
} else {
ch_init_rds = MAKE_SEURAT (
ch_updated_meta.map{ [ it[0], it[1] ] },
ch_updated_meta.map{ [ it[0], it[2] ] },
params.min_cells,
params.min_features,
params.gene_identifier
)
ch_init_rds.rds.join(ch_updated_meta).set { ch_init_rds_meta }
ch_validation_log.mix(ch_init_rds.log).set{ ch_validation_log }
}

ch_normalized_qc = NORMALIZE_QC (
ch_init_rds_meta.map { [it[0], it[1]] },
Expand Down

0 comments on commit 90a7ca9

Please sign in to comment.