hi list:
In the following list, is there a simply way to find element less than 200
sandwiched between two numbers greater than 1000.
a = [3389, 178, 2674, 2586, 13731, 3189, 785, 1038, 25956, 33551]
in a, 178 is between 3389 and 2674. How this particular list can be selected
for further pro
gel
To: tutor@python.org
Sent: Tuesday, February 5, 2013 5:20 PM
Subject: Re: [Tutor] Getting range of a list
On 02/05/2013 04:48 PM, Hs Hs wrote:
> Thanks Steve.
>
> But one question, when I print, I get extra empty lines. How to get rid of
> them! Thanks again.
>>>&
rint head+'\t'+line
X1A
<--
X1G
<-
X2A
X2G
X3A
X3G
X4A
X4A
Thanks
Hs.
From: Steven D'Aprano
To: tutor@python.org
Sent: Tuesday, February 5, 2013 4:28 PM
Subject: Re: [Tutor] Getting range
Dear List members:
I always have problem in getting ranges:
Following is my representation of part of my file.
>X1
A
G
C
G
>X2
A
G
>X3
A
G
>X4
H
T
I want to print the above contents in the following way:
X1 \t A
X1 \t G
X1 \t C
X1 \t G
X2 \t A
X2 \t G
X3 \t A
X3 \t G
X4 \t H
X4 \t H
Here
Dear group:
I have 50 thousand lists. My aim is to search a pattern in the alphabetical
strings (these are protein sequence strings).
MMSASRLAGTLIPAMAFLSCVRPESWEPC VEVVP
NITYQCMELNFYKIPDNLPFSTKNLDLSFNPLRHLGSYSFFSFPELQVLDLSRCEIQTIED
my aim is to find the list of string that has V*VVP.
myseq
thanks all for quick reply. In my previous e-mail I send adding using lambda
function. I now know that I am using too much functionality where simple ways
to solve exist. That's python!
thanks again.
Hs.
From: Evert Rol
To: Hs Hs
Cc: "tutor@
sorry I did this following, please advise if any better way exist:
gc = lambda x,y: x[0]+y[0]
atgc = lambda x,y,k,l: x[0]+y[0]+k[0]+l[0]
>>> gc(a,b)/atgc(a,b,c,d)
0.54545454545454541
Hi:
I have 4 lists:
>>> a
[40]
>>> b
[2]
>>> c
[23]
>>> d
[12]
how is it possible to do add eleme
Hi:
I have 4 lists:
>>> a
[40]
>>> b
[2]
>>> c
[23]
>>> d
[12]
how is it possible to do add elements in list. I can do this using tupples, but
I do not know how to append elements to tuple, thats the reason I am using
list.
I want to find the value of a+c/a+b+c+d - which is 40+23/40+2+23+12
Hi:
I have the following table and I am interested in calculating mismatch ratio. I
am not completely clear how to do this and any help is deeply appreciated.
Length Matches
77 24A0T9T36
71 25^T9^T37
60 25^T9^T26
62 42A19
In length column I have length of the charact
what that pattern would be when I read in a string. I do not
know if regex could solve my kind of problem too.
Thanks
Hs.
From: Hilton Fernandes
To: "tutor@python.org"
Cc: Hs Hs
Sent: Thursday, January 19, 2012 1:39 PM
Subject: Re: [Tutor]
Hi:
I am writing to see if I could any help.
I am trying to find if a mutation in gene falls in a polymer region of DNA. To
explain in simplistic terms,
Given a piece of DNA string, with following characters, I know where mutation
happens. Happens at T (in quotes with spaces.) 3 As before T
http://www.1000genomes.org/node/101
From: Alan Gauld
To: tutor@python.org
Sent: Tuesday, October 11, 2011 1:52 PM
Subject: Re: [Tutor] vcf_files and strings
On 11/10/11 18:16, Hs Hs wrote:
>
> VCF - Variant Call Format
> ...
>
> Nothing
VCF - Variant Call Format
VCF files are nothing special but tab delim files describing the genetic
mutations, friquencies and other base information (bases here mean ATGC
pertaining to DNA).
These files are generated by variety of genome sequence data analysis
pipelines. MIT and Haplotype
if col[x] == 'missense':
print col[withRefSeqID]
hth
From: Anna Olofsson
To: tutor@python.org
Sent: Friday, October 7, 2011 12:12 PM
Subject: [Tutor] vcf_files and strings
Hi,
I'm a beginner at Python and would really appreciate some help in how
hi I have a file and it is in chunks:
I want to be able to select the number that follows 'Elution: ' where the line
startswith (TITLE)(say
72.958) and check if it is larger than my choice of number (say
71.4). If it is then I want to print chunk from BEGIN LINE to END
LINE separated by one empty
M
Subject: Re: [Tutor] selecting elements from dictionary
On Wed, 15 Sep 2010 12:10:59 pm Hs Hs wrote:
> I want to print only those items that have [1,2] and [1,3] in any
> order, such as [1,2] or [2,1], [3,1] or [1,3]
>
> >>> for item in xdic.keys():
>
> ... if [1
dear group:
I have a dictionary object that looks like this:
xdic
{11135457: [1], 11135492: [1], 11135913: [1], 11135436: [1, 2], 11135699: [1,
2], 11135702: [1, 3], 11135901: [1]}
I want to print only those items that have [1,2] and [1,3] in any order, such
as [1,2] or [2,1], [3,1] or [1
hi:
I have a very large file 15Gb. Starting from 15th line this file shows the
following lines:
HWUSI-EAS1211_0001:1:1:977:20764#0
HWUSI-EAS1211_0001:1:1:977:20764#0
HWUSI-EAS1521_0001:1:1:978:13435#0
HWUSI-EAS1521_0001:1:1:978:13435#0
Every two lines are part of one readgroup. I
It is interesting to note war against 'Dive into Python'. Personally I felt it
was good, a quick resource to learn without buying O'reilly books. After I
came across Alan Gauld and Mark Lutz's books, I never referred DintoP. I still
have the printed version of this book from 2002-3 I guess.
A
Hi:
I have a tab-delim file:
col1 col2 col3
andrew1987 1990
jake 1974 1980
jim 1964 1970
lance1984 1992
how can I sort column 2 and get :
jim 1964 1970
jake 1974 1980
lance1984 1992
andrew1987 1990
I know
20 matches
Mail list logo