Seqanswers Leaderboard Ad

Collapse

Announcement

Collapse
No announcement yet.
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Script for creating GO annotation file from Interproscan output

    Dear comunity,

    I am working with a non-model organism, thus I have to use alternative approaches for many of the analyses. At the moment I want to run the GO enrichment analysis of my differentially expressed transcripts using BiNGO, and for that I have to load my own annotation file of the transcriptome assembly which I created with Interproscan. The output of IPRS can be found here: https://github.com/ebi-pf-team/inter...example-output

    So basically, using the IPRS output I have to create one association per line of the transcript ID that is in the 1st column with the GO term that is 14th column. The issue is that for many transcripts there are different GO terms associated, while others have none, as for instance:

    transcript_1 ...columns_2-13... GO:0004601|GO:0006979|GO:0020037|GO:0055114
    transcript_1 ...columns_2-13... GO:0004601|GO:0006979|GO:0020037|GO:0055114
    transcript_1 ...columns_2-13...
    transcript_1 ...columns_2-13... GO:0004601|GO:0055114
    transcript_1 ...columns_2-13... GO:0004601|GO:0042744
    transcript_2 ...columns_2-13...
    transcript_2 ...columns_2-13... GO:0055085

    And here is how the the custom annotation file should be:

    transcript_1 = 0004601
    transcript_1 = 0006979
    transcript_1 = 0020037
    transcript_1 = 0055114
    transcript_1 = 0042744
    transcript_2 = 0055085

    Please, can someone help me with that? It wouldn't be a problem if the output of the script generates reduntant lines really, I can remove duplicated values later.

    Best regards,

    Gustavo

  • #2
    Hi Gustavo,

    I've attached a little python script that should do what you want. I had to name it "rearrange_go.txt" because of seqanswers restrictions - just rename it "rearrange_go.py".

    First open the python file in a text editor and replace INPUT_FILE_NAME with the name of your file. Then put the script in the same directory as your file and run the following:

    python rearrange_go.py

    Another file called 'custom_annotation.txt' should be created. The script assumes you have python installed (mac and linux usually do by default). It also assumes that column 14 is always GO terms, and not anything else, though it can be blank.

    Give it a go and let me know if it works!

    Cheers,

    Matt.
    Attached Files

    Comment


    • #3
      Hi Matt,

      It worked, thanks a lot!!! You saved my day xD

      Cheers,

      Gustavo

      Comment


      • #4
        Excellent! Glad it worked

        Comment

        Latest Articles

        Collapse

        • seqadmin
          Best Practices for Single-Cell Sequencing Analysis
          by seqadmin



          While isolating and preparing single cells for sequencing was historically the bottleneck, recent technological advancements have shifted the challenge to data analysis. This highlights the rapidly evolving nature of single-cell sequencing. The inherent complexity of single-cell analysis has intensified with the surge in data volume and the incorporation of diverse and more complex datasets. This article explores the challenges in analysis, examines common pitfalls, offers...
          06-06-2024, 07:15 AM
        • seqadmin
          Latest Developments in Precision Medicine
          by seqadmin



          Technological advances have led to drastic improvements in the field of precision medicine, enabling more personalized approaches to treatment. This article explores four leading groups that are overcoming many of the challenges of genomic profiling and precision medicine through their innovative platforms and technologies.

          Somatic Genomics
          “We have such a tremendous amount of genetic diversity that exists within each of us, and not just between us as individuals,”...
          05-24-2024, 01:16 PM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Yesterday, 07:24 AM
        0 responses
        10 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-13-2024, 08:58 AM
        0 responses
        11 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-12-2024, 02:20 PM
        0 responses
        16 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 06-07-2024, 06:58 AM
        0 responses
        184 views
        0 likes
        Last Post seqadmin  
        Working...
        X