From 1c0222e9911e49126c8003af4e61e08fbb36b0dd Mon Sep 17 00:00:00 2001
From: ameyner2 <alison.meynert@igmm.ed.ac.uk>
Date: Fri, 18 Jun 2021 11:37:52 +0100
Subject: [PATCH] Excluding undetermined index reads

---
 prepare_bcbio_config_crf.sh     | 2 +-
 prepare_bcbio_config_santosh.sh | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/prepare_bcbio_config_crf.sh b/prepare_bcbio_config_crf.sh
index 0a9a01e..f9e3c00 100755
--- a/prepare_bcbio_config_crf.sh
+++ b/prepare_bcbio_config_crf.sh
@@ -52,7 +52,7 @@ perl -pi -e 's/\r//' $PROJECT_ID.ped
 mkdir -p $READS_DIR/$PROJECT_ID
 
 # generate the family_ids list - makes strong assumption about relative paths!
-ls ../../data/$PROJECT_ID/*.gz | cut -d '/' -f 5 | cut -f 1,3 -d '_' | sort -u > $PROJECT_ID.family_ids.txt
+ls ../../data/$PROJECT_ID/*.gz | grep -v Undetermined | cut -d '/' -f 5 | cut -f 1,3 -d '_' | sort -u > $PROJECT_ID.family_ids.txt
 
 PLATE_ID=`cut -f 1 -d '_' $PROJECT_ID.family_ids.txt | sort -u`
 for FAMILY_ID in `cut -f 2 -d '_' $PROJECT_ID.family_ids.txt`
diff --git a/prepare_bcbio_config_santosh.sh b/prepare_bcbio_config_santosh.sh
index 7c0fe58..9f1fd0c 100755
--- a/prepare_bcbio_config_santosh.sh
+++ b/prepare_bcbio_config_santosh.sh
@@ -66,7 +66,7 @@ do
 
     for FILE in `ls $DOWNLOAD_DIR/$PROJECT_ID/*${SAMPLE}*.gz`
     do
-      echo "$FILE,${SAMPLE}_${FAMILY_ID},$FAMILY_ID,$SEX,$PHENOTYPE,$TARGET" >> ${VERSION}_${PROJECT_ID}_${FAMILY_ID}.csv
+      echo "$FILE,${SAMPLE},$FAMILY_ID,$SEX,$PHENOTYPE,$TARGET" >> ${VERSION}_${PROJECT_ID}_${FAMILY_ID}.csv
     done
 
   done
-- 
GitLab