Entering edit mode
5.2 years ago
jaqx008
▴
110
Hey Guys, I was wondering if there is a command I can run to help generate a .fasta file from the .txt output I generated from tblastn. Or how is this done?
Thanks
A fasta file containing what? Query sequences? Subject sequences? Matched subject sequences?
a .txt file containing tblastn results is the input
we understand that, but what do you want to see end up in the fasta file?
If you run your blast and request tab output format as such:
-outfmt '6 std qseq sseq'
you will get the sequence back as separate fields in the tabulated files, which then can be easily parsed out. Then you're already half way ;)As far as I know there does not exist an off-the-shelf tool to get this. It will require some ad hoc scripting I'm afraid
My professor gave me a perl script that can do this. I will try and see then let y'all know.
Please whats wrong with this command. Trying to use the perl script but its not working.
I am in a different directory, why does it keep saying wd:~/Desktop/oyster
open the script in a text editor (or do cat or more or so on cdmline) and check whether that path is not hard-coded (== it is literally written in the script) in the script.
you mean this?
can you paste you cmdline using the code tag formatting?
is this
perl (wd: ~/Desktop/oyster)
part of your cmdline?you could also do a grep with "Desktop/oyster" on that perl script to check is it is anyway mentioned in it.
No it is not part of my command line.
How can we know what is wrong, if we don't know the script? You should ask your professor how to use it, if he wrote it. Or, if you post the script somewhere (here if short, or pastebin if long), then we can have a look at it. But it difficult, and take lots of back-and-forth, to troubleshoot programs without having access to them.
% blast2gff.pl --blast_result_file [blast result file] --reference_sequence_file [file with reference sequences (optional)] --gff_output_file [gff file name (optional)]
the command is found on this link. https://metacpan.org/pod/distribution/GBrowse/contrib/blast2gff.pl
I am doing
% B.pl --tblasnresult.txt
looking at the script name it will anyway only produce a GFF format of the blast output and will not give you a fasta file in one go. You'll need to create the fasta file from the gff file in a second step.
Yes I plan to first generate the GFF then use this make a .bed then get faster from it., let me try the above as you said.
There is no reason to go over a bed intermediate if you want to end up with fasta output. There are tools around that will create you a fasta file based on a GFF input file
THanks a lot. it worked well with perl in front of the command. Thanks again Lieven.