Commit 619dc4f5 by Eric Coissac

Add a fasta1line function reformating the sequence with a line for the

header and a single line for the sequence
parent e6c05a69
......@@ -117,10 +117,17 @@ function cutseq {
# - $1 : The fasta file containing the sequences to join
function joinfasta {
$AwkCmd '(NR==1 && /^>/) {print $0} \
! /^>/ {print $0}' $1 | \
! /^>/ {print $0}' "${1}" | \
formatfasta
}
function fasta1line {
$AwkCmd '(/^>/ && seq !="") {print seq} \
/^>/ {print $0;seq=""} \
!/^>/ {seq=seq $0} \
END {print seq}' "${1}"
}
function formatfasta {
$AwkCmd 'function printfasta(seq) { \
seqlen=length(seq); \
......@@ -129,7 +136,7 @@ function formatfasta {
} \
/^>/ { print $0 } \
! /^>/ { seq=seq $0 } \
END { printfasta(seq)}' $1
END { printfasta(seq)}' "${1}"
}
......@@ -169,7 +176,7 @@ IR_DATA_DIR="${DATA_DIR}/ir" # Directory containing data related to
TRNA_DATA_DIR="${DATA_DIR}/trna" # Directory containing data related to
# tRNAs detection
CDS_DATA_DIR="${DATA_DIR}/trna" # Directory containing data related to
CDS_DATA_DIR="${DATA_DIR}/cds" # Directory containing data related to
# CDSs detection
RRNA_DATA_DIR="${DATA_DIR}/rrna" # Directory containing data related to
......
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