[BangPypers] list question

2013-12-05 Thread Vikram K
Any suggestions on what i have to do to go from x to y? >>> x = [['cat','NM123',12],['cat','NM234',12], ['dog', 'NM56',65]] >>> x [['cat', 'NM123', 12], ['cat', 'NM234', 12], ['dog', 'NM56', 65]] >>> y = [] >>> y = [['cat','NM123, NM234', 12], ['dog', 'NM56', 65]] >>> Regards Vik

[BangPypers] executing shell commands through python script

2012-08-13 Thread Vikram K
i am able to run the following command from the shell (i am working on Mac Snow Leopard): cgatools evidence2sam --beta --evidence-dnbs evidenceDnbs-chr11-GS10026-ASM-T1.tsv.bz2 --reference build36.crr --output CGI_10026_CLL046_chr11_NUMA1_N.sam --extract-genomic-region chr11,71391559,71469221

[BangPypers] string to list query

2010-08-04 Thread Vikram K
Suppose i have this string: z = 'AT/CG' How do i get this list: zlist = ['A','T/C','G'] ___ BangPypers mailing list BangPypers@python.org http://mail.python.org/mailman/listinfo/bangpypers

[BangPypers] nested list help

2010-07-27 Thread Vikram K
Suppose i have this nested list: >>> x [['NM100', 3, 4, 5, 6, 7], ['NM100', 10, 11, 12, 13], ['NM200', 15, 16, 17]] >>> for i in x: ... print i ... ['NM100', 3, 4, 5, 6, 7] ['NM100', 10, 11, 12, 13] ['NM200', 15, 16, 17] >>> how do i obtain from the above the following nested list: >>> z [['NM