Skip to content

Commit

Permalink
Added skipfastp nftest
Browse files Browse the repository at this point in the history
  • Loading branch information
zxBIB Schcolnicov committed Aug 26, 2024
1 parent 4a73a71 commit 92c289d
Show file tree
Hide file tree
Showing 2 changed files with 363 additions and 0 deletions.
154 changes: 154 additions & 0 deletions tests/test_skipfastp.nf.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@

nextflow_pipeline {

name "Test Workflow main.nf - test_skipfastp"
script "main.nf"
profile "test_skipfastp"
tag "test_skipfastp"
tag "pipeline"

test("test_skipfastp") {

when {
params {
outdir = "$outputDir"
}
}

then {
assertAll(
{ assert workflow.success },
{ assert snapshot(UTILS.removeNextflowVersion("$outputDir")).match("software_versions") },
{ assert workflow.trace.succeeded().size() == 41 },

{ assert snapshot(
path("$outputDir/mirna_quant/reference/hairpin.fa_igenome.fa"),
path("$outputDir/mirna_quant/reference/mature.fa_igenome.fa"),
path("$outputDir/mirna_quant/reference/hairpin.fa_igenome.fa_idx.fa"),
path("$outputDir/mirna_quant/reference/mature.fa_igenome.fa_idx.fa")
).match("mirna_quant_reference") },

{ assert snapshot(
path("$outputDir/mirna_quant/seqcluster/final/small_Clone1_N3.fastp_trimmed.fastq.gz"),
path("$outputDir/mirna_quant/seqcluster/final/small_Clone1_N1.fastp_trimmed.fastq.gz")
).match("mirna_quant_seqcluster") },

{ assert snapshot(
path("$outputDir/mirna_quant/bam/mature/Clone1_N3_mature.sorted.bam").exists(),
path("$outputDir/mirna_quant/bam/mature/Clone1_N1_mature.sorted.bam").exists(),
path("$outputDir/mirna_quant/bam/mature/Clone1_N3_mature.sorted.bam.bai").exists(),
path("$outputDir/mirna_quant/bam/mature/Clone1_N1_mature.sorted.bam.bai").exists(),
path("$outputDir/mirna_quant/bam/mature/Clone1_N3_mature.sorted.stats"),
path("$outputDir/mirna_quant/bam/mature/Clone1_N1_mature.sorted.stats"),
path("$outputDir/mirna_quant/bam/mature/Clone1_N1_mature.sorted.idxstats"),
path("$outputDir/mirna_quant/bam/mature/Clone1_N3_mature.sorted.idxstats"),
path("$outputDir/mirna_quant/bam/mature/Clone1_N3_mature.sorted.flagstat"),
path("$outputDir/mirna_quant/bam/mature/Clone1_N1_mature.sorted.flagstat"),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N3_mature_hairpin.sorted.bam").exists(),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N1_mature_hairpin.sorted.bam").exists(),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N3_mature_hairpin.sorted.bam.bai").exists(),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N1_mature_hairpin.sorted.bam.bai").exists(),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N1_mature_hairpin.sorted.flagstat"),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N3_mature_hairpin.sorted.stats"),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N1_mature_hairpin.sorted.stats"),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N1_mature_hairpin.sorted.idxstats"),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N3_mature_hairpin.sorted.flagstat"),
path("$outputDir/mirna_quant/bam/hairpin/Clone1_N3_mature_hairpin.sorted.idxstats")
).match("mirna_quant_bam") },

{ assert snapshot(
path("$outputDir/mirna_quant/mirtop/mirtop.tsv").exists(),
path("$outputDir/mirna_quant/mirtop/mirtop_rawData.tsv"),
path("$outputDir/mirna_quant/mirtop/mirtop.gff").exists(),
path("$outputDir/mirna_quant/mirtop/mirna.tsv"),
path("$outputDir/mirna_quant/mirtop/stats/mirtop_stats.txt").exists()
).match("mirna_quant_mirtop") },

{ assert snapshot(
path("$outputDir/mirna_quant/edger_qc/hairpin_counts.csv").exists(),
path("$outputDir/mirna_quant/edger_qc/hairpin_logtpm.csv").exists(),
path("$outputDir/mirna_quant/edger_qc/hairpin_unmapped_read_counts.txt").exists(),
path("$outputDir/mirna_quant/edger_qc/hairpin_logtpm.txt").exists(),
path("$outputDir/mirna_quant/edger_qc/hairpin_normalized_CPM.txt").exists(),
path("$outputDir/mirna_quant/edger_qc/mature_logtpm.csv").exists(),
path("$outputDir/mirna_quant/edger_qc/mature_counts.csv").exists(),
path("$outputDir/mirna_quant/edger_qc/mature_logtpm.txt").exists(),
path("$outputDir/mirna_quant/edger_qc/mature_unmapped_read_counts.txt").exists(),
path("$outputDir/mirna_quant/edger_qc/mature_normalized_CPM.txt").exists()
).match("mirna_quant_edger_qc") },

{ assert snapshot(
path("$outputDir/fastqc/raw/Clone1_N1.raw_fastqc.zip").exists(),
path("$outputDir/fastqc/raw/Clone1_N3.raw_fastqc.zip").exists()
).match("fastqc_raw") },

{ assert snapshot(
path("$outputDir/mirtrace/mirtrace-stats-contamination_basic.tsv"),
path("$outputDir/mirtrace/mirtrace-stats-rnatype.tsv"),
path("$outputDir/mirtrace/mirtrace-stats-phred.tsv"),
path("$outputDir/mirtrace/mirtrace-stats-contamination_detailed.tsv"),
path("$outputDir/mirtrace/mirtrace-stats-length.tsv"),
path("$outputDir/mirtrace/mirtrace-stats-qcstatus.tsv"),
path("$outputDir/mirtrace/mirtrace-stats-mirna-complexity.tsv")
).match("mirtrace") },

{ assert snapshot(
path("$outputDir/mirtrace/qc_passed_reads.all.collapsed/small_Clone1_N3.fastp.fasta"),
path("$outputDir/mirtrace/qc_passed_reads.all.collapsed/small_Clone1_N1.fastp.fasta")
).match("mirtrace_qc_passed_reads.all.collapsed") },

{ assert snapshot(
path("$outputDir/mirtrace/qc_passed_reads.rnatype_unknown.collapsed/small_Clone1_N3.fastp.fasta"),
path("$outputDir/mirtrace/qc_passed_reads.rnatype_unknown.collapsed/small_Clone1_N1.fastp.fasta")
).match("mirtrace_qc_passed_reads.rnatype_unknown.collapsed") },

{ assert snapshot(
path("$outputDir/bowtie_index/mirna_hairpin/fasta_bidx.3.ebwt"),
path("$outputDir/bowtie_index/mirna_hairpin/fasta_bidx.2.ebwt"),
path("$outputDir/bowtie_index/mirna_hairpin/fasta_bidx.1.ebwt"),
path("$outputDir/bowtie_index/mirna_hairpin/fasta_bidx.rev.2.ebwt"),
path("$outputDir/bowtie_index/mirna_hairpin/fasta_bidx.4.ebwt"),
path("$outputDir/bowtie_index/mirna_hairpin/fasta_bidx.rev.1.ebwt")
).match("bowtie_index_mirna_hairpin") },

{ assert snapshot(
path("$outputDir/bowtie_index/mirna_mature/fasta_bidx.2.ebwt"),
path("$outputDir/bowtie_index/mirna_mature/fasta_bidx.1.ebwt"),
path("$outputDir/bowtie_index/mirna_mature/fasta_bidx.4.ebwt"),
path("$outputDir/bowtie_index/mirna_mature/fasta_bidx.3.ebwt"),
path("$outputDir/bowtie_index/mirna_mature/fasta_bidx.rev.2.ebwt"),
path("$outputDir/bowtie_index/mirna_mature/fasta_bidx.rev.1.ebwt")
).match("bowtie_index_mirna_mature") },

{ assert snapshot(
path("$outputDir/multiqc/multiqc_data/fastqc-status-check-heatmap.txt"),
path("$outputDir/multiqc/multiqc_data/fastqc_overrepresented_sequences_plot.txt"),
path("$outputDir/multiqc/multiqc_data/mirtrace_complexity_plot.txt"),
path("$outputDir/multiqc/multiqc_data/multiqc_citations.txt"),
path("$outputDir/multiqc/multiqc_data/samtools-stats-dp.txt").exists(),
path("$outputDir/multiqc/multiqc_data/fastqc_sequence_length_distribution_plot.txt"),
path("$outputDir/multiqc/multiqc_data/multiqc_general_stats.txt").exists(),
path("$outputDir/multiqc/multiqc_data/fastqc_per_base_n_content_plot.txt"),
path("$outputDir/multiqc/multiqc_data/fastqc_per_sequence_quality_scores_plot.txt"),
path("$outputDir/multiqc/multiqc_data/mirtrace_qc_plot.txt"),
path("$outputDir/multiqc/multiqc_data/mirtrace_length_plot.txt"),
path("$outputDir/multiqc/multiqc_data/fastqc_top_overrepresented_sequences_table.txt").exists(),
path("$outputDir/multiqc/multiqc_data/fastqc_sequence_counts_plot.txt"),
path("$outputDir/multiqc/multiqc_data/mirtrace_rna_categories_plot.txt"),
path("$outputDir/multiqc/multiqc_data/samtools_alignment_plot.txt").exists(),
path("$outputDir/multiqc/multiqc_data/fastqc_per_base_sequence_quality_plot.txt"),
path("$outputDir/multiqc/multiqc_data/mirtop_read_count_plot.txt").exists(),
path("$outputDir/multiqc/multiqc_data/mirtop_unique_read_count_plot.txt").exists(),
path("$outputDir/multiqc/multiqc_data/mirtop_mean_read_count_plot.txt").exists(),
path("$outputDir/multiqc/multiqc_data/fastqc_sequence_duplication_levels_plot.txt"),
path("$outputDir/multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Percentages.txt"),
path("$outputDir/multiqc/multiqc_data/fastqc_per_sequence_gc_content_plot_Counts.txt"),
path("$outputDir/multiqc/multiqc_data/multiqc_sources.txt").exists()
).match("multiqc_multiqc_data") },

)
}

}

}
209 changes: 209 additions & 0 deletions tests/test_skipfastp.nf.test.snap
Original file line number Diff line number Diff line change
@@ -0,0 +1,209 @@
{
"mirtrace": {
"content": [
"mirtrace-stats-contamination_basic.tsv:md5,af4ef7d436a78b63ebbdbd5736757736",
"mirtrace-stats-rnatype.tsv:md5,c7cb1b388ecd16ae79e1ebdf8d896342",
"mirtrace-stats-phred.tsv:md5,a56d0e1fd11b9284b9705bed63b30c02",
"mirtrace-stats-contamination_detailed.tsv:md5,4aa73df82130f7cf2d056b4c61cd9d2a",
"mirtrace-stats-length.tsv:md5,48e4ec1a5572c2f4f58355125b95f614",
"mirtrace-stats-qcstatus.tsv:md5,9f8357437ea532505d3f3a461be476b0",
"mirtrace-stats-mirna-complexity.tsv:md5,761ad553ef141cb5f7845cf476b323d9"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:39.961892895"
},
"mirna_quant_reference": {
"content": [
"hairpin.fa_igenome.fa:md5,5fb538f60d5288846600dba31010251e",
"mature.fa_igenome.fa:md5,ef4cabcbea05adf334ba6891a50c951a",
"hairpin.fa_igenome.fa_idx.fa:md5,482b0327b0c1e36748c1ee3d3be9be77",
"mature.fa_igenome.fa_idx.fa:md5,ef4cabcbea05adf334ba6891a50c951a"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:35.976877813"
},
"software_versions": {
"content": [
"{BOWTIE_MAP_HAIRPIN={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_MATURE={bowtie=1.3.1, samtools=1.14}, BOWTIE_MAP_SEQCLUSTER={bowtie=1.3.1, samtools=1.14}, FASTQC_RAW={fastqc=0.12.1}, FORMAT_HAIRPIN={fastx_toolkit=0.0.14}, FORMAT_MATURE={fastx_toolkit=0.0.14}, INDEX_HAIRPIN={bowtie=1.3.1}, INDEX_MATURE={bowtie=1.3.1}, MIRTOP_QUANT={mirtop=0.4.25}, MIRTRACE_RUN={mirtrace=1.0.1}, PARSE_HAIRPIN={seqkit=2.6.1}, PARSE_MATURE={seqkit=2.6.1}, SAMTOOLS_FLAGSTAT={samtools=1.2}, SAMTOOLS_IDXSTATS={samtools=1.2}, SAMTOOLS_INDEX={samtools=1.2}, SAMTOOLS_SORT={samtools=1.2}, SAMTOOLS_STATS={samtools=1.2}, SEQCLUSTER_SEQUENCES={seqcluster=1.2.9}, TABLE_MERGE={r-base=3.6.2}, Workflow={nf-core/smrnaseq=v2.3.2dev}}"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:35.931631908"
},
"mirna_quant_bam": {
"content": [
true,
true,
true,
true,
"Clone1_N3_mature.sorted.stats:md5,e028b49e804c55056fca34090cd3d836",
"Clone1_N1_mature.sorted.stats:md5,ae056e94e36c06b35913ae8f9268a473",
"Clone1_N1_mature.sorted.idxstats:md5,4c3722c4eee312a587e3aea26d240696",
"Clone1_N3_mature.sorted.idxstats:md5,bde0293f0938a8a074ad3ac633d8cb73",
"Clone1_N3_mature.sorted.flagstat:md5,9e287eb7ac83624b262864d0255217fd",
"Clone1_N1_mature.sorted.flagstat:md5,f8dd1a5032573e17558964260346c6be",
true,
true,
true,
true,
"Clone1_N1_mature_hairpin.sorted.flagstat:md5,883a0e9f52c4c876ef9847daa63ec0de",
"Clone1_N3_mature_hairpin.sorted.stats:md5,4fbda712e789f98124583069f4f35187",
"Clone1_N1_mature_hairpin.sorted.stats:md5,6f355f21f06071dd5751491a9eb355ef",
"Clone1_N1_mature_hairpin.sorted.idxstats:md5,6601b61f1c8a343ba901f328eb2499ed",
"Clone1_N3_mature_hairpin.sorted.flagstat:md5,1630edf055b591303d7c68d013745938",
"Clone1_N3_mature_hairpin.sorted.idxstats:md5,b44fb26f6be2accc7d52bc38efff69f4"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:37.163599805"
},
"mirna_quant_edger_qc": {
"content": [
true,
true,
true,
true,
true,
true,
true,
true,
true,
true
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:38.608879537"
},
"fastqc_raw": {
"content": [
true,
true
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:39.284103338"
},
"multiqc_multiqc_data": {
"content": [
"fastqc-status-check-heatmap.txt:md5,a16737b9ae7b9b70b0ef7e462101a729",
"fastqc_overrepresented_sequences_plot.txt:md5,0cacfefcbc37b292ae21564f845dfaa6",
"mirtrace_complexity_plot.txt:md5,8c3fae2d2b8fbbe922efd861b8675805",
"multiqc_citations.txt:md5,f46d2983044658a4a89bdec5ba20fda3",
true,
"fastqc_sequence_length_distribution_plot.txt:md5,ff2def0eab8321d4ed590b483641f43b",
true,
"fastqc_per_base_n_content_plot.txt:md5,c345fe5430e3a17ad1dbcc14e7595f50",
"fastqc_per_sequence_quality_scores_plot.txt:md5,edf4d21e2928d37d94bb33a25e1d92a6",
"mirtrace_qc_plot.txt:md5,82c1758d3f20a3e58eff3ebd456ee2f1",
"mirtrace_length_plot.txt:md5,69721d1a60f4a055da2bf091cedd48b3",
true,
"fastqc_sequence_counts_plot.txt:md5,da84941084250726e3828e8908640f8b",
"mirtrace_rna_categories_plot.txt:md5,bf50773cc4c0a82a0dd5b4fe91471062",
true,
"fastqc_per_base_sequence_quality_plot.txt:md5,60f539c88c503680c0b2603749494948",
true,
true,
true,
"fastqc_sequence_duplication_levels_plot.txt:md5,7e7eb4105b8f963bdf68e422e4ebce67",
"fastqc_per_sequence_gc_content_plot_Percentages.txt:md5,7ac995de6a861676f64879b02d04f819",
"fastqc_per_sequence_gc_content_plot_Counts.txt:md5,c18bf431a08ec1230720d83781e8903b",
true
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:47.048873684"
},
"mirna_quant_seqcluster": {
"content": [
"small_Clone1_N3.fastp_trimmed.fastq.gz:md5,1bd799775d6913d60e51dcbf50c39c62",
"small_Clone1_N1.fastp_trimmed.fastq.gz:md5,21c736de10e306f14ec296eaeb38ef45"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:36.043210366"
},
"mirtrace_qc_passed_reads.rnatype_unknown.collapsed": {
"content": [
"small_Clone1_N3.fastp.fasta:md5,ca465c7e3c2aabe56f579fd01e091171",
"small_Clone1_N1.fastp.fasta:md5,293e3a6812111905c073f15fb0fa2169"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:42.273316368"
},
"bowtie_index_mirna_mature": {
"content": [
"fasta_bidx.2.ebwt:md5,778bd05aa462c2119736f9a4056bc41f",
"fasta_bidx.1.ebwt:md5,11a2f568aa785d32246cb8ce1aa8add4",
"fasta_bidx.4.ebwt:md5,78260e9dde22d8f31622c77d71bbb605",
"fasta_bidx.3.ebwt:md5,7aeccc6ec919ce1cfcd2b1e40be743fe",
"fasta_bidx.rev.2.ebwt:md5,ab52bc362b4c382cf213a71219e9efee",
"fasta_bidx.rev.1.ebwt:md5,0520d43b6b75328f3c30254a2d6baa18"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:45.344599116"
},
"bowtie_index_mirna_hairpin": {
"content": [
"fasta_bidx.3.ebwt:md5,5c60180e2f6fc2e0c399f10b9f9bbee2",
"fasta_bidx.2.ebwt:md5,6d99166d1a8a7a1bbf262e89db218278",
"fasta_bidx.1.ebwt:md5,40c2c142e094ab5ea531a0564ad62cee",
"fasta_bidx.rev.2.ebwt:md5,4270939b810aa3f461bacee1edc993aa",
"fasta_bidx.4.ebwt:md5,c3d4dbfbb587261ddf29e906029c10b1",
"fasta_bidx.rev.1.ebwt:md5,4532fb1426b29163b23702c8daf84d62"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:43.962724258"
},
"mirtrace_qc_passed_reads.all.collapsed": {
"content": [
"small_Clone1_N3.fastp.fasta:md5,c56851cf67339ed86f852a0f93bfe410",
"small_Clone1_N1.fastp.fasta:md5,980a9ce357496d7c12d598270ccfedcd"
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:40.647810605"
},
"mirna_quant_mirtop": {
"content": [
true,
"mirtop_rawData.tsv:md5,847886d65be061e26b73aa42115c5be3",
true,
"mirna.tsv:md5,b26e9f5d7535104500e85673b97182a2",
true
],
"meta": {
"nf-test": "0.9.0",
"nextflow": "23.10.0"
},
"timestamp": "2024-08-26T13:38:37.883500873"
}
}

0 comments on commit 92c289d

Please sign in to comment.