-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: Add gene order entry * docs: Add gene order entry * docs: Update diagram
- Loading branch information
Showing
10 changed files
with
260 additions
and
122 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
workflow GENEORDER_INPUT_CHECK { | ||
take: | ||
samplesheet | ||
|
||
main: | ||
samplesheet | ||
.splitCsv(header: true) | ||
.map { it -> get_sample_info_geneorder(it) } | ||
.set { geneorder_input } | ||
|
||
geneorder_input | ||
.map { meta, assemblies, gbks, rgis -> meta.id } | ||
.subscribe { if ( "$it".contains(".") ) exit 1, "Please review data input, sampleIDs may not contain dots, but \"$it\" does." } | ||
|
||
|
||
emit: | ||
geneorder_input | ||
} | ||
|
||
def get_sample_info_geneorder(row) { | ||
def meta = [:] | ||
meta.id = row.sample | ||
meta.single_end = true //Bit of a hack; call assemblies "single end" to allow passing to kraken | ||
|
||
def array = [] | ||
if (!file(row.fna_file_path).exists()) { | ||
print("***") | ||
print(row.fna_file_path) | ||
print("***") | ||
exit 1, "ERROR: Please check input samplesheet -> Assembly file does not exist!\n${row.fna_file_path}" | ||
} | ||
if (!file(row.gbk).exists()) { | ||
print("***") | ||
print(row.gbk) | ||
print("***") | ||
exit 1, "ERROR: Please check input samplesheet -> GenBank file does not exist!\n${row.gbk}" | ||
} | ||
if (!file(row.rgi).exists()) { | ||
print("***") | ||
print(row.rgi) | ||
print("***") | ||
exit 1, "ERROR: Please check input samplesheet -> RGI file does not exist!\n${row.rgi}" | ||
} | ||
array = [ meta, file(row.fna_file_path), file(row.gbk), file(row.rgi) ] | ||
|
||
return array | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
sample,fna_file_path,gbk,rgi | ||
SAMD00052607,test/gene-order/FAA/SAMD00052607.faa,test/gene-order/GBK/SAMD00052607.gbk,test/gene-order/RGI/SAMD00052607_rgi.txt | ||
SAMEA1466699,test/gene-order/FAA/SAMEA1466699.faa,test/gene-order/GBK/SAMEA1466699.gbk,test/gene-order/RGI/SAMEA1466699_rgi.txt | ||
SAMEA1486355,test/gene-order/FAA/SAMEA1486355.faa,test/gene-order/GBK/SAMEA1486355.gbk,test/gene-order/RGI/SAMEA1486355_rgi.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters