Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: Optimizing a code
Post: RE: Optimizing a code

(Jul-11-2019, 03:48 PM)Gribouillis Wrote: It looks like a well known shortest path problem for which good algorithms are known and available in python, such as Dijkstra's algorithm. Have you done so...
Amniote General Coding Help 4 2,457 Jul-11-2019, 04:08 PM
    Thread: Optimizing a code
Post: Optimizing a code

Hello everyone, I create an algorithm that will give me the path of the shortest interactions between 2 proteins, I explain: I have a first file that contains the pairs of proteins to test (ex): pr...
Amniote General Coding Help 4 2,457 Jul-11-2019, 02:11 PM
    Thread: Minimum size
Post: RE: Minimum size

(Jul-09-2019, 06:58 AM)perfringo Wrote: [['1', '6', '9', '33'], ['1', '66', '9', '33'], ['1', '4', '9', '33']] Thank you very much I get the expected results ! :) Is it possible to get the results ...
Amniote General Coding Help 8 3,827 Jul-09-2019, 07:49 AM
    Thread: Minimum size
Post: RE: Minimum size

(Jul-08-2019, 09:18 PM)nilamo Wrote: (Jul-08-2019, 09:14 PM)Amniote Wrote: mylen = lambda s: s.count(' ') + 1What's your intention with that line? I wanted to separate the data according to the s...
Amniote General Coding Help 8 3,827 Jul-08-2019, 10:19 PM
    Thread: Minimum size
Post: Minimum size

Hello everyone, I have the following two-dimensional list: ['1', '6', '66', '9', '33'], ['1', '6', '9', '33'], ['1', '66', '6', '9', '33'], ['1', '66', '9', '33'], ['1', '4', '9', '33']] And I try ...
Amniote General Coding Help 8 3,827 Jul-08-2019, 09:14 PM
    Thread: Keep the longest chains
Post: RE: Keep the longest chains

(Jul-03-2019, 03:32 PM)nilamo Wrote: Why isn't '7 8 9' the first chain in '7 8 9 45 16'? It's really hard to help, when your output doesn't make sense. Help us to understand how you're coming up w...
Amniote General Coding Help 11 4,126 Jul-03-2019, 04:51 PM
    Thread: Keep the longest chains
Post: RE: Keep the longest chains

Quote:Why would they be in a separate list? They're both part of the 7 8 9 chain. not quite and that's the subtlety ... I would need : ['7 8 9', '7 8 9 10', '7 8 9 10 11'] ['7 8 9 45 16', '7 8 9 45'...
Amniote General Coding Help 11 4,126 Jul-03-2019, 03:24 PM
    Thread: Keep the longest chains
Post: RE: Keep the longest chains

(Jul-03-2019, 02:03 PM)perfringo Wrote: I don't get it. You need to get longest sequences of consecutive numbers? You need longest sequences starting with particular number? Can you describe in spo...
Amniote General Coding Help 11 4,126 Jul-03-2019, 03:12 PM
    Thread: Keep the longest chains
Post: RE: Keep the longest chains

(Jul-03-2019, 09:22 AM)perfringo Wrote: "give a man a fish and you feed him for a day; teach a man to fish and you feed him for a lifetime." So grab a paper and a pen and try to be a computer. What...
Amniote General Coding Help 11 4,126 Jul-03-2019, 01:24 PM
    Thread: Keep the longest chains
Post: Keep the longest chains

Hello everyone, I have the following file: 1 2 3 4 7 8 9 10 11 12 4 5 2 1 8 7 8 9 4 5 2 1 8 9 7 8 9 10 11 7 8 9 10 1 2 3 4 5 I need to create a script that will keep only the longest lines (betwee...
Amniote General Coding Help 11 4,126 Jul-03-2019, 08:57 AM
    Thread: Browse a graph
Post: Browse a graph

Hello everyone, I am creating an algorithm that will allow me to find all the chains of size 4 interactions in this tree taking into account the fact that we can go back in the tree (the interactions...
Amniote General Coding Help 0 1,500 Jun-13-2019, 11:50 AM
    Thread: Protein interaction chains
Post: RE: Protein interaction chains

(Jun-12-2019, 02:43 PM)perfringo Wrote: General and probably stupid question: is there 1 -> 4 relationship or 1 <-> 4 In the example file, we find 1 4 which corresponds to 1 -> 4. We fin...
Amniote Data Science 2 2,103 Jun-12-2019, 03:32 PM
    Thread: Protein interaction chains
Post: Protein interaction chains

Hello, I need to create an algorithm that can generate all possible protein interaction chains of size x (x proteins in the chain). I have a test file that represents binary interactions (1 interact...
Amniote Data Science 2 2,103 Jun-12-2019, 02:34 PM
    Thread: compare element of a dictionary
Post: compare element of a dictionary

Hello everyone Here is an excerpt from my file I'm working on: HS3ST1 GPC5 0 0 0 0 96 900 387 939 HS3ST1 GPC1 0 0 0 61 96 900 470 948 ---> EXP HS3ST1 GPC4 0 0 0 0 96 900 462 947 SEMA3F PLXNA4 0 0...
Amniote General Coding Help 1 2,155 May-23-2019, 01:42 PM
    Thread: proteins interactions
Post: RE: proteins interactions

Here is an excerpt from my file where the interactions between two proteins are indicated: NDUFAF7 NDUFS7 126 0 0 112 119 900 708 976 ---> EXP NDUFAF7 NDUFS2 295 0 0 93 50 900 913 993 ---> EXP ...
Amniote General Coding Help 2 2,067 May-23-2019, 07:07 AM
    Thread: proteins interactions
Post: proteins interactions

Hello everyone, I need to create protein interaction chains (composed of 10 proteins) To do this, I created a dictionary in this form: Protein 1 = protein2, protein5, protein6 (protein 1 can intera...
Amniote General Coding Help 2 2,067 May-22-2019, 09:06 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020