Skip to content

Commit

Permalink
fix result pickup for bam filtering and deduplication
Browse files Browse the repository at this point in the history
  • Loading branch information
TCLamnidis committed Dec 4, 2024
1 parent 0dab178 commit 01850ad
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 45 deletions.
23 changes: 12 additions & 11 deletions tests/test.nf.test
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,33 @@ nextflow_pipeline {
// b) the order of the reads in the BAMs is not stable (sorted, but reads that share a start position can be in any order)
// point b) also causes BAIs to be unstable.

def stable_name_all = getAllFilesFromDir("$outputDir/" , true , ['pipeline_info/*'] , null , ['*', '**/*'] )
def stable_name_all = getAllFilesFromDir("$outputDir/" , true , ['pipeline_info/*'] , null , ['*', '**/*'] )

//Bam filtering
def stable_content_bamfiltering = getAllFilesFromDir("$outputDir/bam_filtering" , true , ['*.{bam,bai}'] , null , ['*', '**/*'] )
def stable_name_bamfiltering = getAllFilesFromDir("$outputDir/bam_filtering" , true , null , null , ['*.{bam,bai}'] )
def stable_content_bamfiltering = getAllFilesFromDir("$outputDir/bam_filtering" , true , ['*.{bam,bai}'] , null , ['*.flagstat'] )
def stable_name_bamfiltering = getAllFilesFromDir("$outputDir/bam_filtering" , true , ['*.flagstat'] , null , ['*.{bam,bai}'] )

// Bam input stats
def stable_content_baminputstats = getAllFilesFromDir("$outputDir/bam_input_stats" , true , null , null , ['*', '**/*'] )
def stable_content_baminputstats = getAllFilesFromDir("$outputDir/bam_input_stats" , true , null , null , ['*', '**/*'] )

// Damage estimation
def stable_content_damageestimation = getAllFilesFromDir("$outputDir/damage_estimation" , true , ['**/*.{svg,pdf,log}'] , null , ['**/*.{txt,json}'] )
def stable_name_damageestimation = getAllFilesFromDir("$outputDir/damage_estimation" , true , ['**/*.{txt,json}'] , null , ['**/*.{svg,pdf,log}'] )
def stable_content_damageestimation = getAllFilesFromDir("$outputDir/damage_estimation" , true , ['**/*.{svg,pdf,log}'] , null , ['**/*.{txt,json}'] )
def stable_name_damageestimation = getAllFilesFromDir("$outputDir/damage_estimation" , true , ['**/*.{txt,json}'] , null , ['**/*.{svg,pdf,log}'] )

// Deduplication
def stable_content_deduplication = getAllFilesFromDir("$outputDir/deduplication" , true , ['*.{bam,bai}'] , null , ['*', '**/*'] )
def stable_name_deduplication = getAllFilesFromDir("$outputDir/deduplication" , true , null , null , ['*.{bam,bai}'] )
def stable_content_deduplication = getAllFilesFromDir("$outputDir/deduplication" , true , ['*.{bam,bai}'] , null , ['*.flagstat'] )
def stable_name_deduplication = getAllFilesFromDir("$outputDir/deduplication" , true , ['*.flagstat'] , null , ['*.{bam,bai}'] )

// TODO Final_bams

//Mapping
def stable_content_mapping = getAllFilesFromDir("$outputDir/mapping" , true , ['*.{bam,bai}'] , null , ['*', '**/*'] )
def stable_name_mapping = getAllFilesFromDir("$outputDir/mapping" , true , null , null , ['*.{bam,bai}'] )
// TODO For some reason mapping results are not picked up now...
def stable_content_mapping = getAllFilesFromDir("$outputDir/mapping" , true , null , null , ['**/*.flagstat'] )
def stable_name_mapping = getAllFilesFromDir("$outputDir/mapping" , true , null , null , ['**/*.{bam,bai}'] )

// mapstats
def stable_content_preprocessing = getAllFilesFromDir("$outputDir/preprocessing" , true , ['**/*.{zip,log}', '**/*fastp.html'], null , ['**/*'] )
def stable_name_preprocessing = getAllFilesFromDir("$outputDir/preprocessing" , true , null , null , ['**/*.{zip,log}', '**/*fastp.html'] )
def stable_name_preprocessing = getAllFilesFromDir("$outputDir/preprocessing" , true , null , null , ['**/*.{zip,log}', '**/*fastp.html'] )

// TODO MultiQC

Expand Down
40 changes: 6 additions & 34 deletions tests/test.nf.test.snap
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,7 @@
"nf-test": "0.8.4",
"nextflow": "24.10.0"
},
"timestamp": "2024-12-04T13:37:15.214733"
"timestamp": "2024-12-04T15:59:35.203062"
},
"preprocessing": {
"content": [
Expand Down Expand Up @@ -444,7 +444,7 @@
"nf-test": "0.8.4",
"nextflow": "24.10.0"
},
"timestamp": "2024-12-04T13:37:15.666337"
"timestamp": "2024-12-04T15:59:35.487791"
},
"damage_estimation": {
"content": [
Expand Down Expand Up @@ -514,7 +514,7 @@
"nf-test": "0.8.4",
"nextflow": "24.10.0"
},
"timestamp": "2024-12-04T13:37:15.583413"
"timestamp": "2024-12-04T15:59:35.405707"
},
"bam_input_stats": {
"content": [
Expand All @@ -529,28 +529,11 @@
"nf-test": "0.8.4",
"nextflow": "24.10.0"
},
"timestamp": "2024-12-04T13:37:15.352919"
"timestamp": "2024-12-04T15:59:35.281551"
},
"bam_filtering": {
"content": [
[
[
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_filtered.bam:md5,ef5588f6d91b445e45d9a535663b23da",
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_filtered.bam.bai:md5,d1823ee5a37ad32007d0923731127935",
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_filtered.flagstat:md5,39fd430cc77fc71f71d75a221c1b7880",
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_lengthonly.filtered.bam:md5,5e3d07425f31c39146c6782a4a006274",
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_lengthonly.filtered.bam.bai:md5,159e97ddc9270c8d941f42f5553cf4fe",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_filtered.bam:md5,b1f8d455673bfe9ddd0c30f8202f7fdc",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_filtered.bam.bai:md5,47d808ec3844254317d8232d641bb2e2",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_filtered.flagstat:md5,a9fbd8c9a6f8bb02b191f4140f91d04a",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_lengthonly.filtered.bam:md5,735d1de6a650056f960f14777f64abac",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_lengthonly.filtered.bam.bai:md5,2d74ea6c8c69d6f2aefea345518251e6",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_filtered.bam:md5,da3c74992faf7b6efbf18cf196232f1d",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_filtered.bam.bai:md5,3c8604019275477c10f246d71755b8d4",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_filtered.flagstat:md5,f6c739b729c06e17ca205c64478ad823",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_lengthonly.filtered.bam:md5,9f672ec8e12cd0b669f2b2c11f1bfe4b",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_lengthonly.filtered.bam.bai:md5,fe713cfec5a15eca758b0e7e16a8f89e"
],
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_filtered.flagstat:md5,39fd430cc77fc71f71d75a221c1b7880",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_filtered.flagstat:md5,a9fbd8c9a6f8bb02b191f4140f91d04a",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_filtered.flagstat:md5,f6c739b729c06e17ca205c64478ad823"
Expand All @@ -574,22 +557,11 @@
"nf-test": "0.8.4",
"nextflow": "24.10.0"
},
"timestamp": "2024-12-04T14:38:45.664872"
"timestamp": "2024-12-04T15:59:35.253309"
},
"deduplication": {
"content": [
[
[
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_dedupped.bam:md5,cafd8aec87c34a34a599aaf881bac4c2",
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_dedupped.bam.bai:md5,196d7c4df7b32afc5209fdf7fff96a37",
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_dedupped.flagstat:md5,715d840d3bab5a05934825cd9b799ef3",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_dedupped.bam:md5,1b69fddaf3c71642d02d6849e882e9e9",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_dedupped.bam.bai:md5,c7cf02b36e4bde41184640ee3ba2ef1c",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_dedupped.flagstat:md5,dde5f59b006afdae2ff5fab85bc8ea92",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_dedupped.bam:md5,5e1839765b1b23a630a610e6c732c7df",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_dedupped.bam.bai:md5,aa755b2c836387c3c872cbf60cfa86da",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_dedupped.flagstat:md5,fb4d234136f242c20db27979caa604cf"
],
"JK2782_JK2782_TGGCCGATCAACGA_BAM_Mammoth_MT_Krause_dedupped.flagstat:md5,715d840d3bab5a05934825cd9b799ef3",
"JK2782_JK2782_TGGCCGATCAACGA_Mammoth_MT_Krause_dedupped.flagstat:md5,dde5f59b006afdae2ff5fab85bc8ea92",
"JK2802_JK2802_AGAATAACCTACCA_Mammoth_MT_Krause_dedupped.flagstat:md5,fb4d234136f242c20db27979caa604cf"
Expand All @@ -607,6 +579,6 @@
"nf-test": "0.8.4",
"nextflow": "24.10.0"
},
"timestamp": "2024-12-04T14:38:45.741566"
"timestamp": "2024-12-04T15:59:35.308454"
}
}

0 comments on commit 01850ad

Please sign in to comment.