Skip to content

Commit

Permalink
fixing ATCG filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
DOH-JDJ0303 committed Apr 27, 2024
1 parent d6067d9 commit 2d4f9ec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion bin/input-qc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ cat ${fasta} | sed 's/>.*$/@&@/g' | tr -d '\n' | tr '@' '\n' | grep -v '>' | tai
cat seqs | sort | uniq > f1

#---- FILTER 2: REMOVE SEQUENCES WITH AMBIGUOUS BASES ----#
cat f1 | grep -vE 'R|Y|M|K|S|W|H|B|V|D|N' > f2
cat f1 | grep -E '^[ATCG]+$' > f2
if [ ! -s f2 ]
then
echo "Error: All sequences had ambiguous bases!" && exit 1
Expand Down
2 changes: 1 addition & 1 deletion modules/local/bind-clusters.nf
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ process BIND_CLUSTERS {
if [ -f "${prefix}-looseends.csv " ]
then
max_n=\$(cat *main.csv | cut -f 4 -d ',' | sort -rn)
mv ${prefix}-looseends.csv tmp && cat tmp | grep -v "\$header" | tr ',' '\t' | awk -v max=\${max_n} -v OFS=',' '{print $1,$2,$3,$4+max}' > ${prefix}-looseends.csv
mv ${prefix}-looseends.csv tmp && cat tmp | grep -v "\$header" | tr ',' '\t' | awk -v max=\${max_n} -v OFS=',' '{print \$1,\$2,\$3,\$4+max}' > ${prefix}-looseends.csv
rm tmp
fi
echo \$header > ${prefix}-clusters.csv
Expand Down

0 comments on commit 2d4f9ec

Please sign in to comment.