Unconfigured Ad

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • shyam_la
    Member
    • Mar 2012
    • 97

    #16
    Did that too:

    Traceback (most recent call last):
    File "<stdin>", line 4, in <module)
    IndexError: list index out of range

    Its 100% still tab delimited..

    Comment

    • shyam_la
      Member
      • Mar 2012
      • 97

      #17
      I:\Exome\Annotations>C:\Python27\Python
      Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win
      32
      Type "help", "copyright", "credits" or "license" for more information.
      >>> inf = open("out2.txt")
      >>> outf = open("out2mod.txt",'w')
      >>> for line in inf:
      ... fields = line.strip().split()
      ... if len(fields) > 6:
      ... keyTuple = (fields[1],fields[2],fields[7],fields[12],fields[13],
      fields[16],fields[17])
      ... if keyTuple not in uniqueValues:
      ... uniq[keyTuple] = None
      ... outf.write(line)
      ... ^Z

      Traceback (most recent call last):
      File "<stdin>", line 4, in <module>
      IndexError: list index out of range

      PS: I typed the indentations correctly, even though they aren't showing here..

      Comment

      • Heisman
        Senior Member
        • Dec 2010
        • 534

        #18
        Originally posted by shyam_la View Post
        Yes, I have been using excel to view my results. I have only one sample in so far. So, there aren't multiple files to merge.. Just one.

        Just one list of mutations. I am experimenting with the different tools and callers to get a pipeline at the moment. Using the Exome manual here for pre processing and MuTect from Broad gave excellent mutation calls. After annotation, the type of mutations expected (UV signature) were found in huge amounts and also some of the genes to be mutated in this type of tumor were found mutated. I think I have a viable pipeline to run things through, once more sequences start coming in..

        Anyway, story aside - few lines as you asked..

        1 1653142 G A SNP Hom CDK11B.1 CDK11B mRNA NM_033493 NM_033493.ex.18 3 SYNONYMOUS_CODING D/D gaC/gaT 40 1 2310
        1 1653142 G A SNP Hom CDK11B.1 CDK11B mRNA NM_033492 NM_033492.ex.18 3 SYNONYMOUS_CODING D/D gaC/gaT 40 1 2337
        1 1653142 G A SNP Hom CDK11B.1 CDK11B mRNA NM_033486 NM_033486.ex.18 3 SYNONYMOUS_CODING D/D gaC/gaT 40 1 2343
        1 1653142 G A SNP Hom CDK11B.1 CDK11B mRNA NM_033487 NM_033487.ex.16 3 UTR_5_PRIME: 380 bases from TSS


        There are columns, A to U in there. If columns, A, B, J, O, P, S, T are the same, like the first three lines in the example above, I want only one line to be retained and the remaining two to be discarded.

        Thank you.

        PS: Three columns are mostly empty; thats why you see fewer than U columns there..
        So if a column is empty it doesn't give a delimiter? If you use ANNOVAR to annotate variants (which I highly recommend), it will create a .csv file that at least will have a comma for an empty column. Without delimiters it's trickier as column "O" in one row may correspond to column "N" in another, for example.

        Comment

        • shyam_la
          Member
          • Mar 2012
          • 97

          #19
          It gives a delimiter - as in excel and notepad display it correctly. But when I copy the four lines and then paste here, the gap vanishes.

          But there is no character to represent a null entry, if thats what you mean.
          Last edited by shyam_la; 06-13-2012, 08:43 PM.

          Comment

          • Heisman
            Senior Member
            • Dec 2010
            • 534

            #20
            Then I'm curious why you don't just use excel? It has a remove duplicates function where you can select what columns it considers.

            Comment

            • shyam_la
              Member
              • Mar 2012
              • 97

              #21
              That is news! I never thought that would be possible.. Will give it a shot tomorrrow.

              Thanks.

              Comment

              • Heisman
                Senior Member
                • Dec 2010
                • 534

                #22
                Originally posted by shyam_la View Post
                That is news! I never thought that would be possible.. Will give it a shot tomorrrow.

                Thanks.
                Yeah, in 2007 or 2010 (and maybe earlier versions) you can click on "Data" and then there is a "Remove Duplicates" button.

                Comment

                • shyam_la
                  Member
                  • Mar 2012
                  • 97

                  #23
                  Yeah, in 2007 and above.. It worked!!

                  Thank you so much.

                  Comment

                  • ucpete
                    Member
                    • Dec 2008
                    • 35

                    #24
                    In Python, and most programming languages, lists are indexed starting at zero. So if you want the first, second, and seventh items, you want list[0], list[1], and list[6]. You're referencing objects that don't exist.

                    Comment

                    • shyam_la
                      Member
                      • Mar 2012
                      • 97

                      #25
                      Originally posted by ucpete View Post
                      In Python, and most programming languages, lists are indexed starting at zero. So if you want the first, second, and seventh items, you want list[0], list[1], and list[6]. You're referencing objects that don't exist.
                      Actually, I'm referencing the wrong objects, not objects that don't exist. It should still have executed, shouldn't it?? Just with wrong results..

                      Anyway, when Excel can do it with a couple of mouse clicks, who needs Python?? :P

                      Comment

                      Latest Articles

                      Collapse

                      • SEQadmin2
                        New Genomics Technologies Take Aim at Long-Standing Limits
                        by SEQadmin2


                        Researchers using sequencing and genomics tools often have to make trade-offs. They can choose between speed or scale, short reads or long-range information, or targeted panels or a view of the whole transcriptome. New technologies that have been released this year are built to address those tough choices.

                        We asked six companies the same four questions to learn about their latest products. The new technologies bring a lot to the table, including rethinking sequencing
                        ...
                        Today, 10:25 AM
                      • SEQadmin2
                        How Immunogenomics Decodes Immunity’s Genetic Blueprint
                        by SEQadmin2




                        The immune system’s power comes from its genetic diversity, allowing myriad threats to be neutralized through first recognizing foreign antigens. That diversity is also what makes the immune system so difficult to study. Recent advances in sequencing technology and computational biology, however, are giving researchers new tools to understand immune responses and immune-related diseases in greater detail.

                        This convergence of genetics, immunology, and computation...
                        09-01-2026, 05:41 AM

                      ad_right_rmr

                      Collapse

                      News

                      Collapse

                      Topics Statistics Last Post
                      Started by SEQadmin2, 09-25-2026, 09:06 AM
                      0 responses
                      28 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 09-23-2026, 11:05 AM
                      0 responses
                      24 views
                      0 reactions
                      Last Post SEQadmin2  
                      Started by SEQadmin2, 09-18-2026, 11:37 AM
                      1 response
                      46 views
                      0 reactions
                      Last Post pekgio
                      by pekgio
                       
                      Started by SEQadmin2, 09-16-2026, 10:23 AM
                      1 response
                      55 views
                      0 reactions
                      Last Post pekgio
                      by pekgio
                       
                      Working...