Dear Sergei,
Thank you for your reply!
Here is the script:
Code:prefix = "C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster";
samples = 15;
inputRedirect = {};
/* an associative array, with string entries, used to replace the standard input */
for (bitt=1; bitt<samples; bitt=bitt+1)
{
inputRedirect["01"]="BLOSUM62"; /* Scoring Matrix */
inputRedirect["02"]="No penalty"; /* Do not penalize Prefix-Suffix Indels */
inputRedirect["03"]="Longest in file"; /* Use the longest sequence in the data file as the reference */
inputRedirect["04"]="No"; /* No reference coordinate sequence */
inputRedirect["05"]=prefix+" ("+bitt+").fasta"; /* data file path */
inputRedirect["06"]="No"; /* Skip sequences with unusurally poor allignment scores */
inputRedirect["07"]="No"; /* Only align in the provided direction - no reverse complement */
inputRedirect["08"]="Universal"; /* Choose genetic code - Genbank transl_table = 1 */
inputRedirect["09"]=prefix+bitt+".realignment"; /* save alignment files to */
fprintf (stdout, inputRedirect, "\n");
ExecuteAFile (HYPHY_BASE_DIRECTORY + "TemplateBatchFiles"+
DIRECTORY_SEPARATOR+"SeqAlignment.bf", inputRedirect);
fprintf (stdout, inputRedirect, "\n");
}
and the output:
Code:{"01":"BLOSUM62",
"02":"No penalty",
"03":"Longest in file",
"04":"No",
"05":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster (1).fasta",
"06":"No",
"07":"No",
"08":"Universal",
"09":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster1.realignment"}
Selected sequence GL002701 as reference.
Detecting reading frames for each sequence...
Found:
26 sequences in reading frame 1
0 sequences in reading frame 2
0 sequences in reading frame 3
There were 0 sequences with apparent frameshift/sequencing errors
Performing pairwise alignment with reference sequences
Merging pairwise alignments into a MSA
{"01":"BLOSUM62",
"02":"No penalty",
"03":"Longest in file",
"04":"No",
"05":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster (1).fasta",
"06":"No",
"07":"No",
"08":"Universal",
"09":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster1.realignment"}
{"01":"BLOSUM62",
"02":"No penalty",
"03":"Longest in file",
"04":"No",
"05":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster (2).fasta",
"06":"No",
"07":"No",
"08":"Universal",
"09":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster2.realignment"}
Selected sequence GL000030 as reference.
Detecting reading frames for each sequence...
Found:
26 sequences in reading frame 1
0 sequences in reading frame 2
0 sequences in reading frame 3
There were 0 sequences with apparent frameshift/sequencing errors
Performing pairwise alignment with reference sequences
Merging pairwise alignments into a MSA
{"01":"BLOSUM62",
"02":"No penalty",
"03":"Longest in file",
"04":"No",
"05":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster (2).fasta",
"06":"No",
"07":"No",
"08":"Universal",
"09":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster2.realignment"}
{"01":"BLOSUM62",
"02":"No penalty",
"03":"Longest in file",
"04":"No",
"05":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster (3).fasta",
"06":"No",
"07":"No",
"08":"Universal",
"09":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster3.realignment"}
Selected sequence GL006574 as reference.
Detecting reading frames for each sequence...
Found:
26 sequences in reading frame 1
0 sequences in reading frame 2
0 sequences in reading frame 3
There were 0 sequences with apparent frameshift/sequencing errors
Performing pairwise alignment with reference sequences
Merging pairwise alignments into a MSA
{"01":"BLOSUM62",
"02":"No penalty",
"03":"Longest in file",
"04":"No",
"05":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster (3).fasta",
"06":"No",
"07":"No",
"08":"Universal",
"09":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster3.realignment"}
{"01":"BLOSUM62",
"02":"No penalty",
"03":"Longest in file",
"04":"No",
"05":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster (4).fasta",
"06":"No",
"07":"No",
"08":"Universal",
"09":"C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/cluster4.realignment"}
Selected sequence GL006105 as reference.
Detecting reading frames for each sequence...
Found:
26 sequences in reading frame 1
0 sequences in reading frame 2
0 sequences in reading frame 3
There were 0 sequences with apparent frameshift/sequencing errors
Performing pairwise alignment with reference sequences
Merging pairwise alignments into a MSA
... ...
... ...
Finally I just got two files ("cluster1.realignment" and "cluster1.realignment.nuc") in "C:/HYPHY2.0/tmp/HYPHY2.0/data/KaKs/".
It is really odd. Several other batch files have been run successfully in the same circumstances.
We are working on more than 4000 alignments, and exploring analyses did show that "SeqAlignment.bf" could reduce the false positive information cuased by "uncorrected coarse" alignments. Therefore, to automate "SeqAlignment.bf" is very important to our project.
If you already have a similar executive file by chance, could you post it here? Then I could have a try on my PC.
Thank you!
Changfu