[Tutor] Why Doesn't the for loop Increment?
Stephen P. Molnar
s.molnar at sbcglobal.net
Thu Jan 14 15:33:00 EST 2021
On 01/14/2021 02:35 PM, Dennis Lee Bieber wrote:
> On Thu, 14 Jan 2021 06:19:56 -0500, "Stephen P. Molnar"
> <s.molnar at sbcglobal.net> declaimed the following:
>
> Strange, according to my client, I did send a follow-up yesterday, but
> it seems to lost somewhere in the system. Just in case, I'll duplicate most
> of it here...
>
>> DF = 7-Phloroeckol
>> 0 Aloeemodin
>> 1 beta-Sitosterol
> I don't know pandas but that looks suspiciously like a tabular result
> (dataframe), where "Aloeemodin" and "beta-Sitosterol" are data items
> associated with a category (?) heading of "7-Phloroeckol". Compare that to
> the examples on
> https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.html
> in which the top line has "series" labels, and the left column has row
> numbers.
>
> label1 [label2 ... labeln]
> row0 data1-0 [data2-0... datan-0]
> row1 data1-1 [data2-1... datan-1]
> ..
>
>
> .read_csv() is probably NOT how you want to read the input file (what
> does the raw input file contain? If it is just three lines of names, you do
> not want to be interpreting the first line as a column heading with the
> rest as data values belonging to that column).
>
>> NUM = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
>> LIGAND = 7-Phloroeckol
> While you "think" this is the first of three data items, as far as
> pandas is concerned, this is the LABEL of the first (of only one) "data
> series", and you are never accessing the data series content. And since
> there is only one data series in the frame, the loop exits.
>
>
>
Upon refection, I think that you are absolutely correct. That would
explain why there was no incrementation. In actuality there are going to
be quite a few more ligands, the first round that I am contemplating
will be 298, to be exact. Now, if you consider that I initially will be
doing ten repetitions of the docking of each ligand to seven different
proteins that would be on the order of 20860 sets of data to be
processed. Not a particularly unwieldy number as this sort of study is
concerned.
The question, and my problem, then becomes how do I get a list of
ligands into the script to extract the one number from each file?
A solution would be greatly appreciated.
Thanks in advance.
--
Stephen P. Molnar, Ph.D.
www.molecular-modeling.net
614.312.7528 (c)
Skype: smolnar1
More information about the Tutor
mailing list