We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 30c6e81 commit bfb6755Copy full SHA for bfb6755
preprocessing/make_sample_list.sh
@@ -0,0 +1,36 @@
1
+#! /bin/bash
2
+
3
4
+if [ $# -ne 2 ]; then
5
+ echo "No arguments";
6
+ echo "Usage:";
7
+ echo "./make_sample_list.sh <output_file> <input_folder>";
8
+ exit 1;
9
+fi;
10
11
+if [ "$1" == "" ]; then
12
+ echo "Output file parameter is empty";
13
14
15
16
+if [ "$2" == "" ]; then
17
+ echo "Input folder parameter is empty";
18
19
20
21
+if [ -f $1 ]; then
22
+ echo "Output file already exists";
23
24
25
26
+if [ ! -d $2 ]; then
27
+ echo "Input folder does not exists";
28
29
30
31
+echo -n "Writing output file: $1 ... ";
32
33
+echo -e "#sample\tn_cleaned_reads" > $1;
34
+tail -n1 $2/*/*_summary.stats | grep -v "^$" | grep -v "^==>" | cut -f1,3 >> $1;
35
36
+echo "Done!";
0 commit comments