Thank you @mxs,
Seems like I have bot been clear, I am sorry about that. but I wanted to extract is that those sequences (out.file.fa) corresponding translated amino acid sequences, which are aligned to the sequences in database file.
Like you said before, in this:
Query_2 1125 NVSGNPIIKTESIKLPQQRKSARNVAKKVSYVELDSPKPSQKDGEELPKDVPVVGSAEPP...
...
...
...
Query_2 3645 VFVQNVFVDTHDLRFPWVAFFCSQFIRAGTELTWNYNYDIGSVPGRVLYCHCGSLECKGR 3824
Query_2 3825 LL 3830
not the aligned region(1125-3830), but it's translated amino acid sequences:
1125 NVSGNPIIKTESIKLPQQRKSARNVAKKVSYVELDSPKPSQKDGEELPKDVPVVGSAEPP...
.
.
.
VFVQNVFVDTHDLRFPWVAFFCSQFIRAGTELTWNYNYDIGSVPGRVLYCHCGSLECKGR
LL 3830
If they are in fasta file format, that would be great.
Well you could use
grep -A 100 URSEQID input.fafunction where-Arefers to the number of lines after the matched sequence ID or perl call:or an awk command of you can import everything into a database and use sql queries. there are many ways to do this. The question is which OS are you running on, have your sequence ID's remained the same and could you provide a quick example of your files
Hi @mxs,
My OS is ubuntu. The code I used is:
And the resultant file is:
Aha. well, that is not what I understood. So you want
in nucleotide mode. and you want exactly the aligned region(1125-3824), right?
If we could extract aligned region would be good too, but query nucleotide sequences' blastxed corresponding whole translated amino acid sequences could be extracted even better (for the exemplary sequences, not just 1125-3824 part, but whole 1-4444).
Could that be feasible?