From 0af71f3d6f710e7127e969896d4486763202e2e7 Mon Sep 17 00:00:00 2001 From: cellgeni Date: Tue, 21 Jan 2025 16:20:51 +0000 Subject: [PATCH] Newline charachter adding to the subset list if there is none --- scripts/collect_metadata.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/collect_metadata.sh b/scripts/collect_metadata.sh index 1099eb1..b829710 100755 --- a/scripts/collect_metadata.sh +++ b/scripts/collect_metadata.sh @@ -233,7 +233,10 @@ subset_accessions() { then >&2 echo "Narrowing down the dataset using the file $SUBSET" >&2 echo "New list of the samples to be processed:" - >&2 cat $SUBSET + >&2 cat $SUBSET + ## add newline character to the end of the file if there is none + sed -i -e '$a\' + ## subset the accessions file grep -f $SUBSET $SERIES.sample.list > $SERIES.sample.list.tmp mv $SERIES.sample.list.tmp $SERIES.sample.list grep -f $SUBSET $SERIES.accessions.tsv > $SERIES.accessions.tsv.tmp