last day (14 days later) » 

14:26
@UrszulaUciechowska you can join me here if you want.
You might not be able to write when you fist come here. I can give you write access but you need to first log in to chat. As soon as I see your avatar in the room, I'll give you write access.
@UrszulaUciechowska you should be able to write now
You might need to reload the room.
ok
now I can write
I need to take the protein sequence and the protein ID out of ths file
@UrszulaUciechowska OK, so protein only? And all variants?
For some reason, your example shows a termiator and its translation!
do not need them
the /protein_id="AAQ05968.1" and the sequence
@UrszulaUciechowska OK, so do you have a list of desired input ids?
rest can be deleted
14:38
Do you have a list of the desired protein IDs? How can I know which sequences you want and which ones not?
no
I want all
protein sequences that starts with /translation="
All what? All proteins coded for by the vector?
But if you want the protein only, why do you also want regulatory_class? That is a separate entry, it doesn't refer to the protein.
/protein_id="AAQ05968.1"
/db_xref="GI:33320495"
/translation="MREAVIAEVSTQLSEVVGVIERHLEPTLLAVHLYGSAVDGGLKP
HSDIDLLVTVTVRLDETTRRALINDLLETSASPGESEILRAVEVTIVVHDDIIPWRYP
AKRELQFGEWQRNDILAGIFEPATIDIDLAILLTKAREHSVALVGPAAEELFDPVPEQ
DLFEALNETLTLWNSPPDWAGDERNVVLTLSRIWYSAVTGKIAPKDVAADWAMERLPA
QYQPVILEARQAYLGQEDRLASRADQLEEFVHYVKGEITKVVGK"
Ah, OK, so you were using the regulatory_class only to delimit the sequence?
14:42
OK, let me think about it. You might be able to use the fact that the sequence is in all CAPS
yes you right
@UrszulaUciechowska try this:
sed -n '/\/protein_id=/,/^\s*[[:upper:]]\+"\s*$/{p}' two_seq.txt
its working
at least for this file
can you explain me the command ?
@UrszulaUciechowska It's the same idea as the originals. It will print between the two matching patterns. The general format is
sed -n '/foo/,/bar/{p}`
the -n means "don't print unless explicitly told to do so, the {p} means "print"
So, that command will print all lines between foo and bar.
The one I am using prints all lines between /protein_id= and a line that starts with 0 or more whitespace characters (^\s*), then one or more upper case letters until a " and then 0 or more whitespace until the end of the line (\s*$)
thanks a lot
14:55
@UrszulaUciechowska You're welcome. Could you please edit your question to use protein_id as the delimiter and clarify that you only want the sequence?
That way, I can edit my answer and you could accept it.
@UrszulaUciechowska Thanks. Us bioinformaticians should stick together :)

last day (14 days later) »