Sep 10, 2013, 5:32 PM
Post #1 of 2
Hello! I'm pretty new in script and shell stuffs...
Find a pattern and write the following letters to file
I need to find a pattern in a file of DNA sequences and write the following sequence in an output file. I try to explain better... I have a file like this:
> sample-name seq-length tgattggccgattggaatcg (and so on)
> sample-name seq-length tgaggttccgtaggtccatc (and so on)
I want to find a specific sequence of 10 nucleotide and write all the sequence that follow it in another file. If that specific sequence isn't find, it hasn't to write anything. Moreover, I need to mantain the sequence header with the name of the sample, etc since I'll need it for the following analysis...
Anyone can help me to do this???