Entering edit mode
5.1 years ago
Char20773
•
0
Hello !
I'm quite new to common bioinformatics methods and am now trying to use blastn from command line in ubuntu. I'm trying to limit my output without changing the fasta-files, which I'm using as input.
Example code:
blastn -query genome.fna -db genes_bacteria.fna
I created a db, because I thought there would eventually be an option to refer to the genes in the db I would like to align my query with. Is there? Or is there any other possibility?
Thank you!
You can look at using the restrictive GI list options (take a look at the extensive blast documentation online), but it will require that you know the identifiers you want in advance and have these in a file.
Actually it's only one gene I'm looking for.. is it still necessary to create a gi list for that?
If you only want to compare 2 sequences to each other, and you know in advance which sequences, you're better of using the
bl2seq
mode . syntax is something like this:this does imply you have both sequences, and only those, each in a (separate) fasta file
I think this is what OP was trying to avoid by not “changing the fasta files” (but I agree this is the obvious choice for how to do it ;) )
OK, yes, indeed, my bad .
In that specific case I think your approach will be the most sensible one jrj.healey
and on a side note: do not get confused about the use cases of blast. Blast is NOT an alignment tool, it's a search tool (==refer to it as the google for sequences) . If you want to create proper alignment there are far better options.
AFAIK, yes - if I'm remembering correctly, there is both a flag for identifiers to ignore, and to include, so you'd only have to provide the identifier you want to include to the respective flag. You will still need to make a file with that one entry in however (I think).
To be honest, though I realise you've said you want to avoid this, it would be much easier to manipulate your input files in the first place than to try and tease out just the information you want after the fact.