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
# First split input fasta file
print_status "splitting input file: ${INPUT_FASTA}"
awk -v queryDir="${PVLIB_QUERY}" '
BEGIN {
idstr=""
}
/^>/ {
idstr=substr($0,2)
idstr=substr($1,2)
gsub(/[^A-Za-z0-9._-]/,"_",idstr)
split(idstr,ida)
sname=ida[1]
printf(">%s\n",idstr) >queryDir"/"sname".fa"
printf(">%s\n",idstr) >queryDir"/"idstr".fa"
next
}
sname!="" {
print >queryDir"/"sname".fa"
idstr!="" {
print >queryDir"/"idstr".fa"
}
' "${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