Skip to content

Instantly share code, notes, and snippets.

library("seqinr")
getncbiseq <- function(accession)
{
require("seqinr") # this function requires the SeqinR R package
# first find which ACNUC database the accession is stored in:
dbs <- c("genbank","refseq","refseqViruses","bacterial")
numdbs <- length(dbs)
for (i in 1:numdbs)
{
db <- dbs[i]
cycler==0.10.0
Django==2.0.1
django-cors-headers==2.1.0
django-extensions==1.9.9
imutils==0.4.5
matplotlib==2.1.2
numpy==1.13.3
opencv-python==3.3.1.11
pandas==0.22.0
Pillow==5.0.0
from django.conf import settings
from demoapp import models
def RequestExposerMiddleware(get_response):
def middleware(request):
models.exposed_request = request
response = get_response(request)
return response
return middleware
BLASTN 2.7.1+
Reference: Zheng Zhang, Scott Schwartz, Lukas Wagner, and Webb
Miller (2000), "A greedy algorithm for aligning DNA sequences", J
Comput Biol 2000; 7(1-2):203-14.
Database: cad_res_partial
import unittest
from mycodes import *
class MyTests(unittest.TestCase):
##your playground starts
def yourtest(self):
pass
##your playground ends
if __name__=="__main__":
import unittest
from mycodes import *
class MyTests(unittest.TestCase):
##your playground starts
def test_hello(self):
self.assertEqual(hello('John'), 'Happy testing! John')
##your playground ends
if __name__=="__main__":
E
======================================================================
ERROR: test_hello (__main__.MyTests)
----------------------------------------------------------------------
Traceback (most recent call last):
File "mytests.py", line 7, in test_hello
self.assertEqual(hello('John'), 'Happy testing! John')
NameError: name 'hello' is not defined
----------------------------------------------------------------------
def hello():
pass
def hello(name):
pass
def hello(name):
return "Happy testing! ",name