Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bambus
    Member
    • Nov 2013
    • 20

    #1

    A program to extract the reads and modify the seq ID by adding weight

    Hi everyone,

    I have a problem in executing the perl script (found online) is given below, a script t0 compare 2 files

    1) a file with seq IDs and its weight
    2) a file with seq IDs and the sequences.

    I modified the original script a bit and tried to use the code with my data,but it neither prints out the output nor gives out any errors and further I want to add the weights in the file 1 to the sequence ID after comparing and extracting the respective reads.

    Input files and the script are attached.

    expected output:-

    >comp10003_c0_seq1 len=166 path=[748:0-22 1004:23-46 2527:47-165]_weight=41
    AAGTAGCCTATGCGCTACAGTAAGAAAGACAGGTGAAAAAATGGAAGTAAAACAATTAGA
    TGACTACTTTGGATATACAGAAAAGGGCAGTTCCTTAGAGGGGGAATTACGAGCAGGACT
    AACGACATTCTTGACAATGGCGTACATTCTGTTTGTGAACCCAGAC


    Could anyone please help me out.

    Thank you in advance.
    Attached Files
  • westerman
    Rick Westerman
    • Jun 2008
    • 1104

    #2
    Your script is pulling in the sample_IDs with the '>' attached as well as the count. It then pulls in the sample_reads without the '>' attached. The program thus can not match up sample_IDs with sample_reads. So there are two problems here -- (1) you are not saving the counts and (2) you can not match up IDs.

    The solution is to re-write the part where you have

    $ids{$_} += 1;

    Let us know you want more of a hint than that.

    Comment

    • bambus
      Member
      • Nov 2013
      • 20

      #3
      Does it mean that I have to create a hash of Ids or?

      Comment

      • westerman
        Rick Westerman
        • Jun 2008
        • 1104

        #4
        Yes, create the hash of IDs. You need to do two things:

        1) Remove the '>'
        2) Split out the counts from the read name and save the counts as the values in your hash.

        Comment

        • bambus
          Member
          • Nov 2013
          • 20

          #5
          Can you please help me how to proceed further to fulfill the steps you mentioned as I am not a very good programmer

          Comment

          • westerman
            Rick Westerman
            • Jun 2008
            • 1104

            #6
            The best way to become a better program is to experiment with your programs. :-)

            That said, I would change the line:

            $ids{$_} += 1;

            To

            my ($id, $count) = $_ =~ /^>*(\S+)\s+(\d+)/;
            $ids{$id} = $count;

            Note: I did not test the above. Basically you are taking the input line and looking for:
            1) '>' (optional)
            2) Characters (the id)
            3) Whitespace
            4) Digits (the count)
            And then putting the id and count into your %ids hash

            Comment

            Latest Articles

            Collapse

            • SEQadmin2
              Beyond CRISPR/Cas9: Understand, Choose, and Use the Right Genome Editing Tool
              by SEQadmin2



              CRISPR/Cas9 sparked the gene editing revolution for both research and therapeutics.1 But this system still showed severe issues that limited its applications. The most prominent were the heavy reliance on PAM sequences, delivery limitations, double-stranded breaks that prompt unintended edits and cell death, and editing inefficiency (both in targeting and in knock-in reliability).

              Despite this, “CRISPR helped turn genome editing from a specialized technique into
              ...
              07-31-2026, 11:01 AM
            • SEQadmin2
              Proteomic Platforms: How to Choose the Right Analytical Strategy to Improve Detection and Clinical Applications
              by SEQadmin2


              Proteomics platforms are evolving rapidly, with advances in mass spectrometry and affinity-based approaches expanding what researchers can detect and at what scale. As the field moves toward deeper proteome coverage and clinical applications, scientists face an increasingly complex landscape of tools. This article will explore how researchers are navigating these choices to find the right platform for their work.

              The systematic characterization of the human proteome has
              ...
              07-20-2026, 11:48 AM
            • SEQadmin2
              Advanced Sequencing Platforms Tackle Neuroscience’s Toughest Genomics Problems
              by SEQadmin2



              Genomics studies in neuroscience face a special challenge due to the brain’s complexity and scarcity of samples. Mapping changes in cell type and state using conventional next-generation sequencing methods remains challenging. Advances in technologies like single-cell sequencing, spatial transcriptomics, and long-read sequencing have opened the door to deeper studies of the brain and diseases like Alzheimer’s, amyotrophic lateral sclerosis (ALS), and schizophrenia.
              ...
              07-09-2026, 11:10 AM

            ad_right_rmr

            Collapse

            News

            Collapse

            Topics Statistics Last Post
            Started by SEQadmin2, Yesterday, 07:41 AM
            0 responses
            9 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 08-03-2026, 10:13 AM
            0 responses
            25 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-31-2026, 02:55 AM
            0 responses
            38 views
            0 reactions
            Last Post SEQadmin2  
            Started by SEQadmin2, 07-24-2026, 12:17 PM
            0 responses
            25 views
            0 reactions
            Last Post SEQadmin2  
            Working...