Commit 1df7b991 by Riccardo Vicedomini

minor fix for query filenames used by profilview-build

parent ffeab516
...@@ -205,16 +205,17 @@ PVLIB_QUERY="${PVLIB_DIR}"/query ...@@ -205,16 +205,17 @@ PVLIB_QUERY="${PVLIB_DIR}"/query
# First split input fasta file # First split input fasta file
print_status "splitting input file: ${INPUT_FASTA}" print_status "splitting input file: ${INPUT_FASTA}"
awk -v queryDir="${PVLIB_QUERY}" ' awk -v queryDir="${PVLIB_QUERY}" '
BEGIN {
idstr=""
}
/^>/ { /^>/ {
idstr=substr($0,2) idstr=substr($1,2)
gsub(/[^A-Za-z0-9._-]/,"_",idstr) gsub(/[^A-Za-z0-9._-]/,"_",idstr)
split(idstr,ida) printf(">%s\n",idstr) >queryDir"/"idstr".fa"
sname=ida[1]
printf(">%s\n",idstr) >queryDir"/"sname".fa"
next next
} }
sname!="" { idstr!="" {
print >queryDir"/"sname".fa" print >queryDir"/"idstr".fa"
} }
' "${INPUT_FASTA}" ' "${INPUT_FASTA}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment