From e6c829aa0ff764b1ee614257c13004756c759c7b Mon Sep 17 00:00:00 2001 From: Goldberg Date: Fri, 17 Mar 2023 14:29:01 -0400 Subject: [PATCH] fix for loop for mapping features --- Snippets/20220105_Infinium_mapping.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Snippets/20220105_Infinium_mapping.sh b/Snippets/20220105_Infinium_mapping.sh index 6951a3c..1ad5239 100644 --- a/Snippets/20220105_Infinium_mapping.sh +++ b/Snippets/20220105_Infinium_mapping.sh @@ -266,7 +266,7 @@ function buildFeatureOverlaps { [[ -f tsv_manifest/${PLATFORM}.${REFCODE}.manifest.tsv.gz ]] || exit 1; zcat tsv_manifest/${PLATFORM}.${REFCODE}.manifest.tsv.gz | awk 'NR>1&&$1!="NA"&&$9~/^c[gh]/' | sortbed >$TMPFDR/${PLATFORM}_${REFCODE}.bed - for f in $FEATURES; do + for f in ${FEATURES[@]}; do echo -n Processing feature $f; bedtools intersect -b $TMPFDR/${PLATFORM}_${REFCODE}.bed -a ~/references/${REFCODE}/features/$f.bed.gz -sorted -wo | awk 'BEGIN{print "Probe_ID\tKnowledgebase"}{print $14,$4;}' | sort | uniq | gzip -c >features/${PLATFORM}_${REFCODE}/$f.gz echo " (captured" $(zcat features/${PLATFORM}_${REFCODE}/$f.gz | wc -l) "rows)"