From Variome
Phython overview
Pygr : a Pythong Graph Database Framework for Bioinformatics
- Interpreted language
- Python script.py
- String type : str or basestring
- Line indentation
- \ means continuation
- “”” triple string for the continuous string
- >>> : execution prompt
- No bracelet : if x = true:, elfif, else:
- While x < 10
- range()
- enumerate()
- break, continue
- object : identity, type, value
- function def xfunction(yparameters): , object.xfunction(y)
- import os, os.path.abspath(“.”)
- reload(module)
- self.
- def functionname(parameters): return
- string formatting %s
- function(*tuple)
- function(**dictionary)
- function can be an object, too
- inline function : lambda <args> :<expression>
- variable scopes : global, local, module, class
- name space of the module : module._dict_
- try: except IOError:
- try: finally: - foce a file to finish
- raise exception [, value]
- os, sys, platform, time
- os.path.exists, isdir, isfile, chdir, environ, system
- os.execvp(“program.exe”,[“-verbose”])
- sys.argv
- sys.stdin.readline()
- sys.stout, sys.stderr
- platform.architecture()
- platform.uname()
- time.time()
- equal, ==, >=, <
- upper(), lower()
- capitalize()
- swapcase()
- join(), +, +=
- split(‘:’)
- splitlines(keeplineends)
- find(sub, [,start, [,end]]) -> not found -1
- index(sub, [,start, [,end]]) -> not found error exceptions
- index is faster than the find method
- rfind, rindex : search from right
- replace(old, new, maxreplace)
- endswith(suffix, [, start, [,end]])
- startswith(prefix, [, start, [,end]])
- strip([chrs]), lstrip([chrs]), rstrip([chrs]) = trimming
- rjust(width [,fill]), ljust(width [,fill])
- exec(str [,globals [,locals]])
- eval(str [,globals [,locals]])
- string.Template
- encode('encodingmethod')
- list = ordered collection of objects
- tuple = read only version of the list, unmuttable like array
- dictionary = an unordered colleection of object pairs
- zero based index
- index[-n] : nth item from the end
- list[n:m]
- list.append, list.insert, list.extend(list), list.remove
- list, +-, remove, pop
- list.sort(reverse=1, key=str.lower)
- tuple (), list [], list(), tuple()
- dictionary : many to many relationship is possible
- file : open(path [,mode [,buffersize]])
- file open mode : r, w, a = update, + = add mode
- u = universal new line translator = \r, \n, \r\n => \n
- file.read(), file.readlines()
- linecache.getline(), clearcache()
- file.writelines()
- file.write()
- redirection >>
- tree = os.walk(path)
- os.remove(newFileName)
- os.rename(oldFileName, newFileName)
- for file in os.listdir(path)
- if file.startswith(text)
- for ext in pattern.split(expression)
- tFile = tarfile.open(filename, mode)
- tFile.extract(f, extractPath)
- thread.start_new_thread(print_time, (threadname, number))
- wakecall = threading.Timer(waitTime, clean_queue, (qpath ,))
- wakecall.start()
- import anydbm
- db = anydbm.open(“x.dbm”, ‘n’)
- db.keys()
- p = cPickle.Pickler(file)
- p.dump(db dictionay)
- p = cPickle.Unpickler(file)
- data = p.load()
- db = shelve.open(shelvefile, mode)
- db[‘keys’]= keys
- db.sync()
- for k in db.keys(): obj = db[k]
- import MySQLdb
- myDB = MySQLdb.connect(host=, port=)
- myDB.commit()
- myDB.close()
- cHandler = myDB.cursor()
- cHandler.execute(“SHOW DATABASES”)
- cHandler.fetchall()
- sSock = socket(AF_INET, SOCK_STREAM)
- sSock.bind((serverHost, serverPort))
- sSock.listen(3)
- conn, addr = sSock.accept()
- data = conn.recv(1024)
- s= smtplib.SMTP(mailserver)
- record = s.sendmail(from, to, mMessage)
- mServer = poplib.POP3(popserver)
- ftp = ftplib.FTP(server, id, address)
- ftp.retrbinary()
- parsedTuple = urlparse.urlparse(url)
- urlunparse()
- urlparse.urljoin(unprsedURL, laterpart)
- u = urllib.urlopen(webURL)
- import HTMLParser
- urllib.urlopen(url)
- feed(html)
- cJar = cookielib.LWPCookieJar()
- r = Request(testURL)
- h = urlopen(r)
- sys.stderr = sys.stdout
- data = cgi.FieldStorage()
- self.send_response()
- self.send_header()
2005 sci impact factor
RNA : 6.145
PLoS Biology : 14.672
Genes and Development : 15.61
Neuron : 14.304
Genome Biology : 9.712
The EMBO Journal : 10.053
Mol and Cell Biol: 7.093
Molecular Cell : 14.971
Annual Review of Biochemistry : 33.456
Genomics : 3.181
Various definition of a term, PhD
: A learned individual who had achieved the approval of his peers and who had demonstrated a long and productive career in the field of philosophy.
: A person who has a degree and has undertaken years of research and has published their work and been assessed,
: A doctorate awarded for original contributions to knowledge
: One of the highest earned academic degrees conferred by a university
: Indicates the recipient has done, and is prepared to do, original research in a major discipline.