This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Can I query a BLASTN in Shell using a given input sequence and not a FASTA file?

Hello,

I want to pass an input sequence to BLASTN command and not a FASTA file. I am not able to execute a shell command in this manner - 

blastn -outfmt 5 -query '>Name\nATGGCAGCAGTGGGTGCACCTCGCGAAGTAGCTGGAAACGAGAACAGCCTCGAGATCGATAGTCTTGCTC\nGCTTTGCTGTTGATGAACACAACAAGAAACAGGTTTCTTTCTCTCTCTTGCGAAGATCGCTTTCGCTTTG' -db C:/Users/ptarkar/Desktop/blast_test/targets
The system cannot find the path specified.

Is there a way wherein I can call a BLASTN command with just an input sequence and without a FASTA file?

Thanks,

Pratham

blast

1 answer

Using bash:

blastn -outfmt 5 -query <(echo -e '>Name\nATGGCAGCAGTGGGTGCACCTCGCG') -db C:/Users/ptarkar/Desktop/blast_test/targets

or

echo -e '>Name\nATGGCAGCAGTGGGTGCACCTCGCG' | blastn -outfmt 5 -db C:/Users/ptarkar/Desktop/blast_test/targets

It needs bash in Windows

Log in to answer this question.