Skip to content

Commit

Permalink
[FIX] h5-merge
Browse files Browse the repository at this point in the history
  • Loading branch information
alpae committed Nov 26, 2024
1 parent 44dbb89 commit 1635176
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 17 deletions.
18 changes: 2 additions & 16 deletions modules/local/h5_combine/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,8 @@ process COMBINE_HDF {

script:
"""
files=("$h5files")
first_file="\${files[0]}"
output="combined_file.h5"
echo "copying the first file: \${first_file}"
cp "\${first_file}" "\$output"
# Combine the rest of the files with ptrepack
for ((i=1; i<\${#files[@]}; i++)); do
current_file="\${files[i]}"
echo "Combining with: \$current_file"
# Use ptrepack to combine files
ptrepack --keep-source-filters --propindexes "\${current_file}:/" "\$output:/"
done
rm -f combined_file.h5
h5-merge -vv --out combined_file.h5 $h5files
"""

stub:
Expand Down
2 changes: 1 addition & 1 deletion subworkflows/local/ancestral_go/main.nf
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env nextflow

// Modules
include {HOGPROP, HOGPROP_COLLECT} from "./../../../modules/local/hogprop"
include {HOGPROP; HOGPROP_COLLECT} from "./../../../modules/local/hogprop"

workflow ANCESTRAL_GO {
take:
Expand Down
31 changes: 31 additions & 0 deletions subworkflows/local/extract_fastoma/main.nf
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@

workflow EXTRACT_FASTOMA {
take:
proteome_folder
base_folder

main:
def summaries = base_folder / "Summaries.drw"
def taxonomy = genomes_folder / "taxonomy.sqlite"
def splice_data = genomes_folder / "Splicings.drw"
CONVERT_GS(genomes_folder, matrix_file, summaries)
CONVERT_GS.out.gs_tsv
| splitCsv(sep: "\t", header: true)
| map { row ->
def dbfile = file(row.DBpath)
return tuple( row, dbfile )
}
| transpose
| set { convert_jobs }
CONVERT_PROTEINS(convert_jobs)
CONVERT_OMA_GROUPS(matrix_file)
CONVERT_SPLICE_MAP(splice_data)
CONVERT_TAXONOMY(CONVERT_GS.out.gs_tsv, taxonomy)


emit:
gs_file = CONVERT_GS.out.gs_tsv
protein_files = CONVERT_PROTEINS.out.prot_json.collect()
tax_tsv = CONVERT_TAXONOMY.out.tax_tsv
oma_groups = CONVERT_OMA_GROUPS.out.oma_groups_json
splice_json = CONVERT_SPLICE_MAP.out.splice_json

0 comments on commit 1635176

Please sign in to comment.