You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Quality_Assessment now generates a combined png image of all FASTQC plots
Clarify error messages for Adapter_Trimming and Read_Mapping
RTC and Indel_Realigner now support fixing quality scores that are too high
Automatically check for .bai indexing in Haplotype_Caller, RTC, and Indel_Realigner
Copy file name to clipboardExpand all lines: HelperScripts/utils.sh
+24-6Lines changed: 24 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
# Check to make sure our samples exist
4
4
functioncheckSamples() {
5
-
local sample_list="$1"# Sample ist
5
+
local sample_list="$1"# Sample list
6
6
if [[ -f"${sample_list}" ]] # If the sample list exists
7
7
then
8
8
if [[ -r"${sample_list}" ]] # If the sample list is readable
@@ -11,22 +11,22 @@ function checkSamples() {
11
11
do
12
12
if! [[ -f"${sample}" ]] # If the sample doesn't exist
13
13
then
14
-
echo"${sample} does not exist, exiting...">&2# Exit out with error
14
+
echo"The sample ${sample} does not exist, exiting...">&2# Exit out with error
15
15
return 1
16
16
else
17
17
if! [[ -r"${sample}" ]] # If the sample isn't readable
18
18
then
19
-
echo"${sample} does not have read permissions, exiting...">&2
19
+
echo"The sample ${sample} does not have read permissions, exiting...">&2
20
20
return 1
21
21
fi
22
22
fi
23
23
done
24
24
else# If the sample isn't readable
25
-
echo"${sample_list} does not have read permissions, exiting...">&2
25
+
echo"The sample list ${sample_list} does not have read permissions, exiting...">&2
26
26
return 1
27
27
fi
28
28
else# If the sample list doesn't exist
29
-
echo"$sample_list does not exist, exiting...">&2# Exit out with error
29
+
echo"The sample list $sample_list does not exist, exiting...">&2# Exit out with error
30
30
return 1
31
31
fi
32
32
}
@@ -149,4 +149,22 @@ function createDict() {
149
149
}
150
150
151
151
# Export the function
152
-
export -f createDict
152
+
export -f createDict
153
+
154
+
# Check to make sure our BAM files are indexed
155
+
functioncheckBaiIndex() {
156
+
local sample_list="$1"# Sample list of BAM files, already checked by checkSamples (above)
157
+
forsamplein$(cat "${sample_list}")# For each sample in the sample list
158
+
do
159
+
local basename=$(basename "${sample}" .bam)
160
+
local dirname=$(dirname "${sample}")
161
+
if [[ !-f"${dirname}/${basename}.bai"&&!-f"${dirname}/${basename}.bam.bai" ]] # If the sample doesn't have a .bai index file of either naming convention
162
+
then
163
+
echo"The sample ${sample} does not have a .bai index, exiting...">&2
0 commit comments