Hello,
I'm doing a biomedical degree and am taking a course on bioinformatics. We
were given a raw version of a public database in a file (the file is in
simple ASCII) and need to extract only certain lines containing important
information. I've made a script that does not work and I am having tro
Hello,
I've written a script that scans a biological database and extracts some
information. A sample of output from my script is as follows:
LYLGILLSHAN AA3R_SHEEP26331
LYMGILLSHAN AA3R_HUMAN26431
MCLGILLSHANAA
Dear All,
I have built a list with multiple occurrences of a string after some text
processing that goes something like this:
[cat, dog, cat, cat, cat, dog, dog, tree, tree, tree, bird, bird, woods,
woods]
I am wondering how to truncate this list so that I only print out the unique
elements, i.e
Hello everyone,
I have written a program, as part of a bioinformatics project, that extracts
motif sequences (programmatically just strings of letters) from a database
and writes them to a file.
I have written another script to annotate the database file (in plaintext
ASCII format) by replacing ev
Hello everyone,
I have a Python script that extracts some text from a database file and
annotates another file,
writing the results to a new file. Because the files I am annotating are
ASCII,
I am very restricted as to how I can annotate the text, and I would like to
instead
write the results to H
Thanks, very simple but I missed that because it was supposed be in HTML
code!
On Tue, May 10, 2011 at 1:16 PM, Spyros Charonis wrote:
> Hello everyone,
>
> I have a Python script that extracts some text from a database file and
> annotates another file,
> writing the result
Hello,
I know I posted the exact same topic a few hours ago and I do apologize for
this, but my script had a careless error, and my real issue is somewhat
different.
I have a Python script that extracts some text from a database file and
annotates another file, writing the results to a new file.
Hi all,
No need to post answers, I figured out where my mistake was.
Spyros
On Tue, May 10, 2011 at 5:11 PM, Spyros Charonis wrote:
> Hello,
>
> I know I posted the exact same topic a few hours ago and I do apologize for
> this, but my script had a careless error, and my real issue
newline = line.replace(item, annotation)
# sys.stdout.write(newline)
align_file_appmode.write(newline)
motif_file.close()
align_file_rmode.close()
align_file_appmode.close()
the line
annotation = ""+item+""
added a span and set the color in CSS.
On Tue, M
I have a file with the following contents:
>from header1
abcdefghijkl
mnopqrs
tuvwxyz
*
>from header2
poiuytrewq
lkjhgfdsa
mnbvcxz
*
My string processing code goes as follows:
file1=open('/myfolder/testfile.txt')
scan = file1.readlines()
string1 = ' '
for line in scan:
if line.startswith('>
Greetings Python List,
I have a motif sequence (a list of characters e.g. 'EAWLGHEYLHAMKGLLC')
whose index I would like to return.
The list contains 20 strings, each of which is close to 1000 characters long
making it far too cumbersome to display an example.
I would like to know if there is a way
Hello List,
A quick string processing query. If I have an entry in a list such as
['>NAME\n'],
is there a way to split it into two separate lines:
>
NAME
___
Tutor maillist - Tutor@python.org
To unsubscribe or change subscription options:
http://mail.
Hello List,
I'm trying to read some sequence files and modify them to a particular
format. These files are structured something like:
>P1; ICA1_HUMAN
AAEVDTG. (A very long sequence of letters)
>P1;ICA1_BOVIN
TRETG(A very long sequence of letters)
>P1;ICA2_HUMAN
WKH.(another sequence)
Dear python community,
I have a file where I store sequences that each have a header. The
structure of the file is as such:
>sp|(some code) =>1st header
AGGCGG
MNKPLOI
.
.
>sp|(some code) => 2nd header
AA
...
.
..
I am looking to implement a logical structure t
Thanks for all the help, Peter's and Hugo's methods worked well in
concatenating multiple lines into a single data structure!
S
On Fri, Feb 10, 2012 at 5:30 PM, Mark Lawrence wrote:
> On 10/02/2012 17:08, Peter Otten wrote:
>
>> Spyros Charonis wrote:
>>
>>
Hello python community,
I'm having a small issue with list indexing. I am extracting certain
information from a PDB (protein information) file and need certain fields
of the file to be copied into a list. The entries look like this:
ATOM 1512 N VAL A 222 8.544 -7.133 25.697 1.00 48.
Dear Python community,
I have a set of ~500 files which I would like to run a script on. My script
extracts certain information and
generates several lists with items I need. For one of these lists, I need
to combine the information from all
500 files into one super-list. Is there a way in which I
' (calling
my python program) 'homology_models[i]' (the file to run it on)
the glob.glob routine returns a list of files, so maybe python does not
allow the syntax "python (call interpreter)" "list entry" ?
Many thanks.
Spyros
On Fri, May 18, 2012 at 7:5
a
diagnostic I included a print statement
in the serialize function to see that the list that is generated for each
of the 500 files.
Short of some intricacy with the scopes of the program I may be missing, I
am not sure why this is happening? Deos anybody have
any ideas? Many thanks for your ti
FINAL SOLUTION:
### LOOP OVER DIRECTORY
location = '/Users/spyros/Desktop/3NY8MODELSHUMAN/HomologyModels'
zdata = []
for filename in os.listdir(location):
filename = os.path.join(location, filename)
try:
zdata.extend(extract_zcoord(filename))
except NameError:
print "No such file!"
except SyntaxEr
On Wed, May 30, 2012 at 8:16 AM, Steven D'Aprano wrote:
> On Wed, May 30, 2012 at 07:00:30AM +0100, Spyros Charonis wrote:
> > FINAL SOLUTION:
>
> Not quite. You are making the mistake of many newbies to treat Python
> exceptions as a problem to be covered up and hidden, i
Hello pythoners,
I have a string that I want to read in fixed-length windows.
In [68]: SEQ
Out[68]:
'MKAAVLTLAVLFLTGSQARHFWQQDEPPQSPWDRVKDLATVYVDVLKDSGRDYVSQFEGSALGKQLNLKLLDNWDSVTSTFSKLREQLGPVTQEFWDNLEKETEGLRQEMSKDLEEVKAKVQPYLDDFQKKWQEEMELYRQKVEPLRAELQEGARQKLHELQEKLSPLGEEMRDRARAHVDALRTHLAPYSDELRQ
Dear All,
I am learning about analysis of algorithms (python 2.7.6). I am reading a
book (Problem solving with Algorithms and Data Structures) where Python is
the language used for implementations. The author introduces algorithm
analysis in a clear and understandable way, and uses an anagram dete
Hello Pythoners,
I am experiencing a strange result with the pickle module when using it to
write certain results to a separate file.
In short, I have a program that reads a file, finds lines which satisfy
some criteria, and extracts those lines, storing them in a list. I am
trying to write this
that I get from my code in a separate file,
in human-readable format.
On Mon, Feb 4, 2013 at 1:03 AM, Alan Gauld wrote:
> On 03/02/13 19:26, Spyros Charonis wrote:
>
>> I am experiencing a strange result with the pickle module when using it
>> to write certain results to a sep
Hello Pythoners,
I am trying to extract certain fields from a file that whose text looks
like this:
COMPND 2 MOLECULE: POTASSIUM CHANNEL SUBFAMILY K MEMBER 4;
COMPND 3 CHAIN: A, B;
COMPND 10 MOL_ID: 2;
COMPND 11 MOLECULE: ANTIBODY FAB FRAGMENT LIGHT CHAIN;
COMPND 12 CHAIN: D, F;
COMPN
print line
flag_FAB = 0
On Thu, Mar 14, 2013 at 4:33 PM, Mark Lawrence wrote:
> On 14/03/2013 11:28, taserian wrote:
>
> Top posting fixed
>
>
>> On Thu, Mar 14, 2013 at 6:56 AM, Spyros Charonis > <mailto:s.charo...@gmail.com>> wrote:
>>
>>
Dear Pythoners,
I am trying to extract from a set of about 20 sequences, the characters
which are unique to each sequence. For simplicity, imagine I have only 3
"sequences" (words in this example) such as:
s1='spam'; s2='scam', s3='slam'
I would like the character that is unique to each seque
Dear group,
I'm having a bit of trouble with understanding why my bubble sort
implementation doesn't work. I've got the following function to perform a
bubble sort operation on a list of numbers:
def bubble_sort_ascending(unsorted):
""" Sorts a list of numbers into ascending order """
are that lists have sort()
and reverse() methods. I'm in the process of learning a bit about data
structures & algorithms using Python as my implementation language.
On Sat, Nov 15, 2014 at 7:02 PM, Alan Gauld
wrote:
> On 15/11/14 16:46, Spyros Charonis wrote:
>
> def bubble_so
n unsorted
On Sun, Nov 16, 2014 at 4:50 AM, Steven D'Aprano
wrote:
> On Sat, Nov 15, 2014 at 04:46:26PM +, Spyros Charonis wrote:
> > Dear group,
> >
> >
> > I'm having a bit of trouble with understanding why my bubble sort
> > implementation doesn
31 matches
Mail list logo