Skip to content

Commit 528cbf2

Browse files
committed
Minor bug correction
1 parent dab2363 commit 528cbf2

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

src/dictys/scripts/helper/gene_gtf.sh

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
#!/bin/bash
2-
# Lingfei Wang, 2022. All rights reserved.
3-
4-
function detect_basedir()
5-
{
6-
b="$(which homer)"
7-
if [ "a$b" == "a" ]; then printf '%s' 'Failed: check if you have homer installed'; return; fi
8-
echo "$(dirname "$(dirname "$(realpath "$b")")")"
9-
}
2+
# Lingfei Wang, 2022, 2025. All rights reserved.
103

114
function usage()
125
{
@@ -47,7 +40,7 @@ paste "$fbed".step3 "$fbed".step2 | awk '{print $1"\t"$2"\t"$3"\t"$6"\t"$4"\t"$5
4740
sort "$fbed".step2 | uniq -c | awk '$1!="1"{print "\t"$2"\t"}' > "$fbed".step5
4841
grep -vf "$fbed".step5 -F "$fbed".step4 > "$fbed".step6
4942
#Then add back the first entry for each duplicate value in designated field
50-
grep -f "$fbed".step5 -F "$fbed".step4 > "$fbed".step7
43+
grep -f "$fbed".step5 -F "$fbed".step4 > "$fbed".step7 || true
5144
cat "$fbed".step5 | while read l; do grep -F -m 1 "$l" "$fbed".step7 >> "$fbed".step6; done
5245
#Remove duplicate genes
5346
t1="$(awk '{print $4}' "$fbed".step6 | uniq -c | grep -v '^[[:blank:]]*1[[:blank:]]' | awk '{print $2}' || true )"

0 commit comments

Comments
 (0)