diff deseq/differential_expression_analysis_pipeline_for_rnaseq_data-a03838a6eb54/DiffExpAnal/loadMultiFastqFiles.sh @ 10:6e573fd3c41b draft

Uploaded
author yufei-luo
date Mon, 13 May 2013 10:06:30 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deseq/differential_expression_analysis_pipeline_for_rnaseq_data-a03838a6eb54/DiffExpAnal/loadMultiFastqFiles.sh	Mon May 13 10:06:30 2013 -0400
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+OUTFile=${1}
+shift
+groupCount=1
+replicateNumber=1
+
+arrayZ=( $@ )
+#remove the last symble '@' given by commande line
+unset arrayZ[${#arrayZ[@]}-1]
+
+for FILE in ${arrayZ[@]}
+do
+	#if a new group of fastq, re-count the replicateNumber
+	if echo $FILE | grep -q "@" 
+	then 
+		groupCount=$(($groupCount + 1))
+		replicateNumber=1
+	else
+		echo -e "Group${groupCount}_${replicateNumber}\t${FILE}" >>${OUTFile}
+		replicateNumber=$(($replicateNumber + 1))
+  	fi
+done
+