Quantcast
Channel: Post Feed
Viewing all articles
Browse latest Browse all 41826

BLAST: Querying a single sequence without input file in C

$
0
0

This is with reference to the query posted in https://www.biostars.org/p/17265/. If I try to run the following using command line it runs perfectly fine: 

blastn -query <(echo -e ">Name\nATCGTTAGCT") -subject <(echo -e ">Name\nATCGTTAGCT")

But, I am doing the same by a C program where I run BLASTP which takes in two strings (fasta_GWIDD and fasta_UNIPROT in the code) and compares them. The problem that I am encountering is the use of echo/system in the code. Can anyone suggest what am I missing out??  

for(i=0;i<index1;i++)
{
    sprintf(fasta_GWIDD,">%s\\n%s\n",fasta_name1[i],fasta_seq1[i]);
    setenv("GwiddVar", fasta_GWIDD, 1) ;
    sprintf(fasta_UNIPROT,">%s\\n%s\n",fasta_name2[i],fasta_seq2[i]);
    setenv("UniprotVar", fasta_UNIPROT, 1) ;
    system("blastp -query <(echo -e $GwiddVar) -subject<(echo -e $UniprotVar)");
}

The error is:

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `blastp -query <(echo -e $GwiddVar) -subject<(echo -e $UniprotVar)'

Viewing all articles
Browse latest Browse all 41826

Trending Articles