-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspreading_correction.sh
More file actions
executable file
·25 lines (21 loc) · 1.37 KB
/
spreading_correction.sh
File metadata and controls
executable file
·25 lines (21 loc) · 1.37 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash
#location for production server
#outlocation=$(mktemp -d /media/GalaxyData/database/files/XXXXXX)
#location for the testserver
#outlocation=$(mktemp -d /media/GalaxyData/files/XXXXXX)
outlocation=$(mktemp -d /home/galaxy/ExtraRef/XXXXXX)
python3 /home/galaxy/Tools/Spreading-Correction/create_input.py -t $1 -n $2 -ot $outlocation"/transposed.txt" -o $outlocation"/nextera_transposed.txt"
sed 's/\t/ /g' $outlocation"/nextera_transposed.txt" > $outlocation"/nextera_transposed_space.txt"
#echo "${6}"
if [ "${6}" == "True" ]
then
python3 /home/galaxy/Tools/Spreading-Correction/unspread_manual.py $outlocation"/nextera_transposed_space.txt" --i5 'S.index.name' --i7 'N.index.name' --column 0 --sep ' ' --rows $7 --cols $8 --conditional_spreading_input "${9}" --c "${10}" --output_folder $outlocation"/" > $outlocation"/log.txt"
cat $outlocation"/log.txt" >> $outlocation"/log2.txt"
else
python3 /home/galaxy/Tools/Spreading-Correction/unspread.py $outlocation"/nextera_transposed_space.txt" --i5 'S.index.name' --i7 'N.index.name' --column 0 --sep ' ' --rows $7 --cols $8 --h $9 --c "${10}" --t "${11}" --output_folder $outlocation"/" > $outlocation"/log.txt"
cat $outlocation"/log.txt" $outlocation"/"*".log" >> $outlocation"/log2.txt"
fi
mv $outlocation"/log2.txt" $3
mv $outlocation"/"*".pdf" $4
[ -f $outlocation"/"*".csv" ] && mv $outlocation"/"*".csv" $5
rm -rf $outlocation