Skip to content

Commit

Permalink
Merge pull request #238 from alexblaessle/sra_merge_samplesheet_large…
Browse files Browse the repository at this point in the history
…_studies

Resolved bug when prefetching large studies
  • Loading branch information
drpatelh authored Jan 4, 2024
2 parents a6f7d52 + 87c94c0 commit f794ea3
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 117 deletions.
34 changes: 0 additions & 34 deletions modules/local/sra_merge_samplesheet/main.nf

This file was deleted.

9 changes: 0 additions & 9 deletions modules/local/sra_merge_samplesheet/nextflow.config

This file was deleted.

32 changes: 0 additions & 32 deletions modules/local/sra_merge_samplesheet/tests/main.nf.test

This file was deleted.

27 changes: 0 additions & 27 deletions modules/local/sra_merge_samplesheet/tests/main.nf.test.snap

This file was deleted.

2 changes: 0 additions & 2 deletions modules/local/sra_merge_samplesheet/tests/tags.yml

This file was deleted.

19 changes: 7 additions & 12 deletions workflows/sra/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
include { MULTIQC_MAPPINGS_CONFIG } from '../../modules/local/multiqc_mappings_config'
include { SRA_FASTQ_FTP } from '../../modules/local/sra_fastq_ftp'
include { SRA_IDS_TO_RUNINFO } from '../../modules/local/sra_ids_to_runinfo'
include { SRA_MERGE_SAMPLESHEET } from '../../modules/local/sra_merge_samplesheet'
include { SRA_RUNINFO_TO_FTP } from '../../modules/local/sra_runinfo_to_ftp'
include { SRA_TO_SAMPLESHEET } from '../../modules/local/sra_to_samplesheet'

Expand Down Expand Up @@ -118,32 +117,28 @@ workflow SRA {
params.nf_core_rnaseq_strandedness ?: 'auto',
params.sample_mapping_fields
)


//
// MODULE: Create a merged samplesheet across all samples for the pipeline
//
SRA_MERGE_SAMPLESHEET (
SRA_TO_SAMPLESHEET.out.samplesheet.collect{it[1]},
SRA_TO_SAMPLESHEET.out.mappings.collect{it[1]}
)
ch_versions = ch_versions.mix(SRA_MERGE_SAMPLESHEET.out.versions)
// Combine all sample sheet/mapping paths into two files
ch_samplesheet=SRA_TO_SAMPLESHEET.out.samplesheet.map{it[1]}.collectFile(name:'samplesheets.csv', newLine: true, keepHeader: true, storeDir:params.outdir)
ch_mappings=SRA_TO_SAMPLESHEET.out.samplesheet.map{it[1]}.collectFile(name:'id_mappings.csv', newLine: true, keepHeader: true, storeDir:params.outdir)

//
// MODULE: Create a MutiQC config file with sample name mappings
//
ch_sample_mappings_yml = Channel.empty()
if (params.sample_mapping_fields) {
MULTIQC_MAPPINGS_CONFIG (
SRA_MERGE_SAMPLESHEET.out.mappings
ch_mappings
)
ch_versions = ch_versions.mix(MULTIQC_MAPPINGS_CONFIG.out.versions)
ch_sample_mappings_yml = MULTIQC_MAPPINGS_CONFIG.out.yml
}

emit:
fastq = fastq_files
samplesheet = SRA_MERGE_SAMPLESHEET.out.samplesheet
mappings = SRA_MERGE_SAMPLESHEET.out.mappings
samplesheet = ch_samplesheet
mappings = ch_mappings
sample_mappings = ch_sample_mappings_yml
versions = ch_versions.unique()
}
Expand Down
1 change: 0 additions & 1 deletion workflows/sra/nextflow.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
includeConfig "../../modules/local/multiqc_mappings_config/nextflow.config"
includeConfig "../../modules/local/sra_fastq_ftp/nextflow.config"
includeConfig "../../modules/local/sra_ids_to_runinfo/nextflow.config"
includeConfig "../../modules/local/sra_merge_samplesheet/nextflow.config"
includeConfig "../../modules/local/sra_runinfo_to_ftp/nextflow.config"
includeConfig "../../modules/local/sra_to_samplesheet/nextflow.config"
includeConfig "../../modules/nf-core/sratools/prefetch/nextflow.config"
Expand Down

0 comments on commit f794ea3

Please sign in to comment.