On Sunday, June 17, 2012 11:30:00 AM UTC-4, praveen krishna wrote:
>
> Ya I have checked the code 'rev' is generating the value what I expect but
> the problem is in inserting the data to database and generating the same
> output.
>
I don't think the problem could be with the insert. Exactly how
Ya I have checked the code 'rev' is generating the value what I expect but
the problem is in inserting the data to database and generating the same
output.
On Sun, Jun 17, 2012 at 5:26 PM, Anthony wrote:
> for name in zf.namelist():
>> filename = name.split('/')[-1]
>>
>
> for name in zf.namelist():
> filename = name.split('/')[-1]
> file_raw = zf.read(name)
> jsoligo = ''.join(split(''.join(file_raw)))[::-1]
> rev=(jsoligo[find(jsoligo,'/')+2:find(jsoligo,';')][::-1])
>
Have you co
My complete code:
from sys import argv
from string import find, split, strip
import os
import zipfile
def import_files():
items = []
'''stub for import'''
form = form_factory(Field('seqzip', 'upload', label="Sequence Files
(.zip)", requires=IS_NOT_EMPTY(), uploadfield=False))
if for
What's your current complete code for generating the values and inserting
them in the db? What's an example of a complete file path and name within
the zip file as well as the contents of that file that is producing a value
like the ones below?
ya its in subfolder but with ' filename = name.spl
ya its in subfolder but with ' filename = name.split('/')[-1]' I am able to
read the file names and with 'file_raw = zf.read(name) ' i am able to read
the sequence in the file .But the other problem with table is not solved I
am still getting unwanted information like file path for example like
"we
>
> I have tried that by removing the subfolder but its giving an error
> import zipfile
> def zipfolder():
> zf =
> zipfile.ZipFile('/home/praveen/job_files/seq_data/PCGENE_Format.zip')
> fil =
> zf.open('/home/praveen/job_files/seq_data/PCGENE_Format.zip/NPKGTS1')
> print fil
> err
I have tried that by removing the subfolder but its giving an error
import zipfile
def zipfolder():
zf =
zipfile.ZipFile('/home/praveen/job_files/seq_data/PCGENE_Format.zip')
fil =
zf.open('/home/praveen/job_files/seq_data/PCGENE_Format.zip/NPKGTS1')
print fil
error:
There is no item na
Are there subfolders in the zipfile? I would think you would want to use
the full name (including path) to extract/open the file, not just the
filename:
for name in zf.namelist():
print zf.open(name)
Anthony
On Thursday, June 14, 2012 7:37:36 AM UTC-4, praveen krishna wrote:
>
> Hi,
> I
Pretty hard to follow.
One thing: you might need a db.commit()
after rec.update_record(raw_seq=file_raw,processed_seq=rev) since it's
looping.
Can you browse your DB to see what exactly is in it? If it's SQLite, you
can use a Firefox addon:
https://addons.mozilla.org/en-US/firefox/addon/sqlite
ok thanks, I will look into the code and the line ' records = db(
db.plugin_seq.id>0).select(**)'. Is by mistake I haven't removed it
.It doesn't has any thing to do with the code .
On Tue, Jun 12, 2012 at 9:56 PM, Anthony wrote:
> for name in zf.namelist():
>> filename = na
>
> for name in zf.namelist():
> filename = name.split('/')[-1]
> file_raw = zf.open(name)
> jsoligo = ''.join(split(''.join(file_raw)))[::-1]
> rev=(jsoligo[find(jsoligo,'/')+2:find(jsoligo,';')][::-1])
>
I'm not g
You either need to re-write the import process to not include the path. Or
strip off the path after you retrieve the records.
It would help to actually see the data. I don't really understand what you
mean when you say "path".
Also, can we see your code that extracted from the ZIP file and inse
But how to remove the extragenous data will I have use any filters to do so?
On Tue, Jun 12, 2012 at 9:25 PM, pbreit wrote:
> Sounds like the problem is with how you inserted the data into the DB. To
> get the data out is pretty easy:
> records = db(db.plugin_seq.id>0).select()
>
> Any extraneou
Sounds like the problem is with how you inserted the data into the DB. To
get the data out is pretty easy:
records = db(db.plugin_seq.id>0).select()
Any extraneous data is already in the database. To fix that you either need
to fix the insertion process or strip out the extraneous data after
ob
>
> Ya actually my data is large I want all the values of the field processed
> seq in table plugin_seq .I am getting all the unwanted information like the
> path with the processed sequnce.I am sure that basic code to process the
> sequence is correct as I have verified it in python but when I
Ya actually my data is large I want all the values of the field processed
seq in table plugin_seq .I am getting all the unwanted information like the
path with the processed sequnce.I am sure that basic code to process the
sequence is correct as I have verified it in python but when I am
implementi
On Tuesday, June 12, 2012 1:33:33 PM UTC-4, praveen krishna wrote:
>
> I want to extract all the attributes of a single column in a table .The
> column name is processed sequence .I tried with the above code but its not
> working .
>
Are you saying you want all the values stored in the processed
I want to extract all the attributes of a single column in a table .The
column name is processed sequence .I tried with the above code but its not
working .
On Tue, Jun 12, 2012 at 3:37 PM, Anthony wrote:
> for record in records:
>> record = db(db.plugin_seq.processed_**seq).select()
>
> for record in records:
> record = db(db.plugin_seq.processed_seq).select()
>
Can you explain the above code? You are repeating the same query every pass
through the for loop (the query returns all records that have a value for
processed_seq). You then end up with the "record" va
20 matches
Mail list logo