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
          Advanced Methods for the Detection of Infectious Disease
          by seqadmin




          The recent pandemic caused worldwide health, economic, and social disruptions with its reverberations still felt today. A key takeaway from this event is the need for accurate and accessible tools for detecting and tracking infectious diseases. Timely identification is essential for early intervention, managing outbreaks, and preventing their spread. This article reviews several valuable tools employed in the detection and surveillance of infectious diseases.
          ...
          Yesterday, 01:15 PM
        • seqadmin
          Strategies for Investigating the Microbiome
          by seqadmin




          Microbiome research has led to the discovery of important connections to human and environmental health. Sequencing has become a core investigational tool in microbiome research, a subject that we covered during a recent webinar. Our expert speakers shared a number of advancements including improved experimental workflows, research involving transmission dynamics, and invaluable analysis resources. This article recaps their informative presentations, offering insights...
          11-09-2023, 07:02 AM

        ad_right_rmr

        Collapse

        News

        Collapse

        Topics Statistics Last Post
        Started by seqadmin, Yesterday, 08:12 AM
        0 responses
        14 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 11-22-2023, 09:29 AM
        1 response
        46 views
        0 likes
        Last Post VilliamPast  
        Started by seqadmin, 11-22-2023, 08:53 AM
        0 responses
        30 views
        0 likes
        Last Post seqadmin  
        Started by seqadmin, 11-21-2023, 08:24 AM
        0 responses
        23 views
        0 likes
        Last Post seqadmin  
        Working...
        X