GithubHelp home page GithubHelp logo

danielschuette / cloningprimer Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 2.0 11.89 MB

Web App, CLI, and API for designing cloning primer pairs - written in Go๐Ÿ‘ฉ๐Ÿผโ€๐Ÿ”ฌ๐Ÿ‘จ๐Ÿผโ€๐Ÿ”ฌ

Home Page: http://www.cloningprimer.com

License: MIT License

Go 48.98% C++ 17.68% Makefile 0.78% HTML 28.06% CSS 4.50%
go molecular-biology biology-lab-protocols cloning primer-design genetics

cloningprimer's Introduction

CloningPrimer

GitHub (pre-)release GoDoc Packagist Build Status codecov

About

Cloning Primer is a software tool to facilitate the design of primer pairs for gene cloning. Given a certain nucleotide sequence and a set of parameters (see Documentation), it returns forward and reverse primers as well as useful statistics like GC content, the probability of the primer pair to form dimers, and much more.

The software is accessible via a web application, but it is recommended to download the command line application (CLI) to enable offline use. Also, an API (written in Go) is available through this GitHub repository. Cloning Primer is under active development, so source code, web interface, API, and CLI might change in the future!

A working version of Cloning Primer is currently available as a pre-release version v0.0.3. Please review the documentation section of this README file for more information about available functionality.

Overview

A pre-release version of the web application is available here.

CLI binaries can be downloaded from ./bin in this repository.

Table of Contents

  1. About

  2. Overview

  3. Documentation

  4. License

Documentation

Installation and Application Programming Interface (API)

Installation

To use Cloning Primer, install The Go Programming Language from here. Follow these instructions to set up a working Go programming environment (you need to set the $GOPATH environment variable to be able to go get third party packages). The, run the following command at a command prompt:

$ go get github.com/DanielSchuette/cloningPrimer

To install the goprimer command line tool (CLI), run:

$ cd $GOPATH/src/github.com/DanielSchuette/cloningPrimer
$ make

NOTE: You can install the CLI without installing Go by going to the ./bin directory of this repository and downloading the respective binary for your operating system. However, this is not recommended because you will have to download the example files (in ./app/assets) manually as well if you want to run the example code below and you cannot use the local web app or the API.

You can run a local version of the Cloning Primer web app, too:

$ cd $GOPATH/src/github.com/DanielSchuette/cloningPrimer/app
$ go run server.go # runs the web app at `localhost:8080'

Usage Example

More documentation regarding the Go API of Cloning Primer is available here.

A minimal, working example:

package main

import (
	"fmt"
	"log"

	cloningprimer "github.com/DanielSchuette/cloningPrimer"
)

func main() {
	// define an input string (must be a valid nucleotide sequence)
	input := "ATGCAAAAACGGGCGATTTATCCGGGTACTTTCGATCCCATTACCAATGGTCATATCGATATCGTGACGCGCGCCACGCAGATGTTCGATCACGTTATTCTGGCGATTGCCGCCAGCCCCAGTAAAAAACCGATGTTTACCCTGGAAGAGCGTGTGGCACTGGCACAGCAGGCAACCGCGCATCTGGGGAACGTGGAAGTGGTCGGGTTTAGTGATTTAATGGCGAACTTCGCCCGTAATCAACACGCTACGGTGCTGATTCGTGGCCTGCGTGCGGTGGCAGATTTTGAATATGAAATGCAGCTGGCGCATATGAATCGCCACTTAATGCCGGAACTGGAAAGTGTGTTTCTGATGCCGTCGAAAGAGTGGTCGTTTATCTCTTCATCGTTGGTGAAAGAGGTGGCGCGCCATCAGGGCGATGTCACCCATTTCCTGCCGGAGAATGTCCATCAGGCGCTGATGGCGAAGTTAGCGTAG"

	// find forward primer with EcoRI restriction site and 5 random nucleotides as an overhang
	forward, err := cloningprimer.FindForward(input, "GAATTC", 1, 18, 4, false)
	if err != nil {
		log.Fatalf("error finding forward primer: %s\n", err)
	}
	if forward == "" {
		log.Fatalf("no forward primer found\n")
	}

	// find reverse primer with BamHI restriction site and 3 random nucleotides as an overhang
	reverse, err := cloningprimer.FindReverse(input, "GGATCC", 1, 20, 3, true)
	if err != nil {
		log.Fatalf("error finding reverse primer: %s\n", err)
	}
	if reverse == "" {
		log.Fatalf("no reverse primer found\n")
	}

	// print results
	fmt.Printf("input: %s\nforward primer: %s\nreverse primer: %s\n", input, forward, reverse)
}

Command Line Interface (CLI)

Install the Cloning Primer CLI (called goprimer) as described above. To see the available command line arguments, run:

$ goprimer --help

## Output:

#Usage of goprimer:
#  -3prime_start int
#    	3' position of the first complementary nucleotide in the provided sequence that the reverse primer should bind to
#    	see './doc' for more information on how to customize primer calculations (default 1)
#  -5prime_start int
#    	5' position of the first complementary nucleotide in the provided sequence that the forward primer should bind to
#    	see './doc' for more information on how to customize primer calculations (default 1)
#  -enzyme_file string
#    	valid file path to a *.re file with correctly formatted restriction enzyme information
#    	default is the file at 'github.com/DanielSchuette/app/assets/enzymes.re' (default "../app/assets/enzymes.re")
#  -enzyme_name_forward string
#    	name of the enzyme you want to use for the 5' end (must be in the '--enzyme_file') (default "BamHI")
#  -enzyme_name_reverse string
#    	name of the enzyme you want to use for the 3' end (must be in the '--enzyme_file') (default "EcoRI")
#  -length_forward int
#    	length of the complementary part of the forward primer (default 18)
#  -length_reverse int
#    	length of the complementary part of the reverse primer (default 18)
#  -overhang_forward int
#    	number of random nucleotides added to the forward primer (an integer between 2 - 10) (default 4)
#  -overhang_reverse int
#    	number of random nucleotides added to the reverse primer (an integer between 2 - 10) (default 4)
#  -seq_file string
#    	valid file path to a *.seq file with correctly formatted DNA sequence information
#    	default is the file at 'github.com/DanielSchuette/app/assets/tp53.seq' (default "../app/assets/tp53.seq")
#  -start_codon
#    	set this flag to 'false' if the input sequence does not have a start codon (an ATG will be added automatically) (default true)
#  -stop_codon
#    	set this flag to 'false' if the input sequence does not have a stop cdon (then, a TAA will be added automatically) (default true)
#  -verbose
#    	enable verbose output (defaults to false)

If you installed Go and goprimer correctly (i.e. the bin/ directory of your workspace is in your $PATH), you should be able to run $ goprimer ... from every directory. If you want to run the following example, though, navigate to the ./cmd directory of this repository first (otherwise goprimer cannot find the example files):

$ cd $GOPATH/src/github.com/DanielSchuette/cloningPrimer/cmd
$ goprimer

The output should be the forward and reverse primers for cloning the tp53 gene (sequence in ./app/assets/tp53.seq). Additional command line flags (--<argument>) allow for further customization of these primers. If you want to use goprimer to design primers based on your own sequence and/or .re enzyme file, specify the --seq_file and --enzyme_file arguments. Be aware that your .re and .seq files have to follow the formats specified in the example files, otherwise the goprimer utility will not be able to parse your data and will throw an error.

Web Application

Web app documentation is available on the Cloning Primer website.

License

This software is licensed under the MIT license, see LICENSE for more information.

cloningprimer's People

Contributors

danielschuette avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.