From 41965583c63f0cbb6f212e57b332e6ebfa94f62d Mon Sep 17 00:00:00 2001 From: chiouj02 Date: Thu, 26 Sep 2024 20:02:07 -0400 Subject: [PATCH] change hard-coded GCST and sort tmpdir --- modules/local/harmonization.nf | 2 +- workflows/gwascatalogharm.nf | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/local/harmonization.nf b/modules/local/harmonization.nf index 798c2a6a..628246b4 100644 --- a/modules/local/harmonization.nf +++ b/modules/local/harmonization.nf @@ -43,6 +43,6 @@ process harmonization { pos=\$(awk -v RS='\t' '/base_pair_location/{print NR; exit}' ${chrom}.merged_unsorted.hm) head -n1 ${chrom}.merged_unsorted.hm > ${chrom}.merged.hm; - tail -n+2 ${chrom}.merged_unsorted.hm | sort -n -k\$chr -k\$pos >> ${chrom}.merged.hm + tail -n+2 ${chrom}.merged_unsorted.hm | sort -n -k\$chr -k\$pos -T\$PWD >> ${chrom}.merged.hm """ } diff --git a/workflows/gwascatalogharm.nf b/workflows/gwascatalogharm.nf index 9e8fc8c6..9dd8b51c 100644 --- a/workflows/gwascatalogharm.nf +++ b/workflows/gwascatalogharm.nf @@ -86,7 +86,7 @@ workflow GWASCATALOGHARM { def input_files(Path input) { - return [(input.getName()=~ /GCST\d+/).findAll()[0],input+"-meta.yaml",input] + return [input.getName().split("\\.")[0],input+"-meta.yaml",input] } /* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~