Find the answer to your Linux question:
Results 1 to 2 of 2
Hello again, I keep coming back to these forums because I always get lots of useful help whenever I ask a question... so thanks! I have another question now. I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2013
    Posts
    7

    Will PERL let me do this?


    Hello again, I keep coming back to these forums because I always get lots of useful help whenever I ask a question... so thanks!

    I have another question now.

    I read somewhere a little while ago that the PERL programming language is a small efficient language used for text manipulation.

    In my summer project, I need to take a long sequence of DNA, which is about 3000 characters long

    (i.e. AGCCTAGTTAGCCCGAGCTCGGAGCGAGCTATGAG... etc)

    And split it up into 21 character long fragments, but each fragment must be shifted over one character. So for example, if I had the sequence

    AAATTTAAATTTXAAATTTAAATTTAAATTT

    The sequences I would need would be

    AAATTTAAATTTAAATTTAAA
    AATTTAAATTTAAATTTAAAT
    ATTTAAATTTAAATTTAAATT
    TTTAAATTTAAATTTAAATTT
    TTAAATTTAAATTTAAATTTX
    TAAATTTAAATTTAAATTTXA

    ...and so on.

    (I used the X as a reference point so you could see how I need to shift each segment over by one nucleotide)

    Then, once all of these are generated, I need to put a little id tag above each of them so it looks like

    >Segment_1
    AAATTTAAATTTAAATTTAAA
    >Segment_2
    AATTTAAATTTAAATTTAAAT
    >Segment_3
    ATTTAAATTTAAATTTAAATT

    ... and so on.

    Then I would save this file and proceed to use it.

    Now, by NO MEANS am I asking someone to make this script for me, I just want to know

    A) Will PERL allow me to do this


    and

    B) What are some useful starting links/tutorials to learn this language for the purpose I want to use it for?

    Thanks a bunch guys, hopefully I'm not asking too much

    Cheers
    Nick

  2. #2
    Penguin of trust elija's Avatar
    Join Date
    Jul 2004
    Location
    Either at home or at work or down the pub
    Posts
    3,284
    Perl is very good at manipulating text. This is an introduction to the language.
    What do we want?
    Time machines!

    When do we want 'em?
    Doesn't really matter does it!?


    Conkybots: Interactive plugins for your Conkys!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •