Hi,
I need to map oligos from Affymetrix arrays (25 mers) to oligos from
Operon (70 mers). For that I use the blast function under pygr in the
following way :
from pygr import seqdb
from pygr import blast
operon = seqdb.SequenceFileDB('OPERONprobes.fasta')
blastmap = blast.BlastMapping(operon)
affy = seqdb.SequenceFileDB('ATH1probes.fasta')
numberprobe = len(affy)
for i in numberprobe:
nameprobe = affy.keys()[i]
probemap = affy[nameprobe]
try:
fprobe = blastmap[probemap]
edges.extend([fprobe.edges()])
del fprobe
except NameError:
edges = fprobe.edges()
except:
pass
'OPERONprobes.fasta' contains the operon oligos, it's a fasta file with
29000 sequences, and the 'ATH1probes.fasta' contains the affymetrix
oligos in fasta format, it contains 250 000 oligos sequences.
It works this way, however it's rather slow, the complete mapping will
take around 40 hours.
Lookink in the tutorial on the blast module I found that it is possible
to pass a 'queryDB' argument in the form of a dictionary containing
multiple sequences to be used as queries
Useful methods:
BlastMapping.__call__(/seq/, /al=None/, /blastpath='blastall'/,
/blastprog=None/, /expmax=0.001/, /maxseq=None/, /opts="/,
/verbose=None/, /queryDB=None/)
I tried several things but I couldn't make it work. I have several
questions on how to use this function :
How to make the dictionary ? In my case should this dictionnary be
comprised of the sequence I want to use to query or to map to, meaning
should this dictionnary contains the sequence of the Operon arrays or of
the Affymetrix arrays ?
In the kwargs argument, the seq should be the operon I guess ?
After having done the BlastMapping using the blastmap =
blast.BlastMapping(operon,**kwargs), how to query this blast ?
Do I have to query it sequence by sequence or can I query it using the
dictionnary I used as an argument in the kwargs ?
I tried this :
seq_db = dict(seq1=affy[affy.keys()[1]], seq2=affy[affy.keys()[2]], ...)
kwargs = {"seq":'operon', "al":None, "blastpath":'blastall',
"blastprog":'blastn', "expmax":0.001, "maxseq":None, "verbose":None,
"queryDB":'seq_db'}
blastmap = blast.BlastMapping(operon,**kwargs)
fprobe = blastmap[seq_db]
Using the function this way I got this error message :
Traceback (most recent call last):
File "<console>", line 1, in <module>
File "/usr/local/lib/python2.6/dist-packages/pygr/blast.py", line
191, in __getitem__
al = self.__call__(k) # run BLAST & get NLMSA storing results
File "/usr/local/lib/python2.6/dist-packages/pygr/blast.py", line
348, in __call__
blastprog = self.blast_program(seq, blastprog)
File "/usr/local/lib/python2.6/dist-packages/pygr/blast.py", line
301, in blast_program
blastprog = blast_program(seq.seqtype(), self.seqDB._seqtype)
AttributeError: 'dict' object has no attribute 'seqtype'
any help will be very useful,
regards,
Julien Bellis
--
You received this message because you are subscribed to the Google Groups
"pygr-dev" group.
To post to this group, send email to pygr-...@googlegroups.com.
To unsubscribe from this group, send email to
pygr-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/pygr-dev?hl=en.