I want remove the long unaligned gap from the files with position wise. I have input life this files
>f1
--------------------------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------------GTTYGVC
SKAFKFLGTPADTGHGTVVLELQYTGTDGPCKVPISSVASLNDLTPVGRLVTVNPFVSVA
>f2
--------------------------------------------------------------------------------------------------------------------
-----------------------------MVHRQWFFDLPLPWA-----------------------------------------GTTYGMC
TEKFSFAKNPADTGHGTVVIELSYSGSDGPCKIPIVSVASLNDMTPVGRLVTVNPFVATS
>f3
MRCVGVGNRDFVEGLSGATWVDVVLEHGGCVTTMAKNKPTLDIELQKTEATQLATLRKLC
IEGKITNITTDSRCPTQGEAVLPEEQDQNYVCKHTYVDRGWGNGCGLFGKGSLVTCAKFQ
CLEPIEGKVVQYENLKYTVIITVHTGDQHQVGNETQGVTAEITPQASTTEAILPEYGTLGGG
And I want the output like this
>f1
------------------------------------------------------------------------------------------------------GTTYGVC
SKAFKFLGTPADTGHGTVVLELQYTGTDGPCKVPISSVASLNDLTPVGRLVTVNPFVSVA
>f2
-----------------------------MVHRQWFFDLPLPWA-----------------------------------------GTTYGMC
TEKFSFAKNPADTGHGTVVIELSYSGSDGPCKIPIVSVASLNDMTPVGRLVTVNPFVATS
>f3
IEGKITNITTDSRCPTQGEAVLPEEQDQNYVCKHTYVDRGWGNGCGLFGKGSLVTCAKFQ
CLEPIEGKVVQYENLKYTVIITVHTGDQHQVGNETQGVTAEITPQASTTEAILPEYGTLGGG
So equal number of gaps are removed from f1 and f2 gaps as well as from f3 remove the one line on the basis of position removed from f1 and f2.
Thanks in advance
why ? sounds like http://xyproblem.info/
How about Gblocks: http://molevol.cmima.csic.es/castresana/Gblocks/Gblocks_documentation.html
I have used this Gblocks and trimal but both are not suitable for your data set. Please help how to write the perl or python script
Do you know the positions of the gaps to remove? Are they based on the blast result?
No. Please guide Yes.. On the based on blast result. I have got the aligned file PROMAL3D to get aligned file.. yes the position is known.
provide examples of the positions in which to remove gaps
Example Input file
>f1
------------------------------------------------------------------------------------------------------GTTYGVC SKAFKFLGTPADTGHGTVVLELQYTGTDGPCKVPISSVASLNDLTPVGRLVTVNPFVSVA
>f2
-----------------------------MVHRQWFFDLPLPWA-----------------------------------------GTTYGMC TEKFSFAKNPADTGHGTVVIELSYSGSDGPCKIPIVSVASLNDMTPVGRLVTVNPFVATS
Outpur file example
why you keep the gaps at the beginning of f1 and f2 output? how many gaps do you want to keep?
This does not look like you want to remove gaps but just remove the new line characters on the fasta header line.
This question is unrelated to Perl or Blast so I removed those tags.
Hello skjobs1234!
It appears that your post has been cross-posted to another site: https://bioinformatics.stackexchange.com/questions/2524/r
This is typically not recommended as it runs the risk of annoying people in both communities.