Timeline for What are the standard ways to visualize protein-protein or gene-gene interactions?
Current License: CC BY-SA 3.0
5 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 12, 2017 at 12:59 | comment | added | mjoppich | Indeed the code was written down quite fast, however, I added your comments to the solution. | |
Jun 12, 2017 at 12:59 | history | edited | mjoppich | CC BY-SA 3.0 |
improved code as per comments
|
Jun 12, 2017 at 11:35 | comment | added | bli |
Also, you can do directly aline = line.strip("\n").split("\t") , since you don't re-use the modified line (and I would call this variable fields rather than aline ).
|
|
Jun 12, 2017 at 11:30 | comment | added | bli |
Instead of the lineCount counter, if you want to skip the first line you can do: with open(inFile, "r") as my_file: my_file.readline(); for line in my_file: . The readline will advance to the file to its next line. It is considered best practice to open a file inside a with context manager.
|
|
Jun 12, 2017 at 8:34 | history | answered | mjoppich | CC BY-SA 3.0 |