Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View arupgsh's full-sized avatar
:octocat:

Arup Ghosh arupgsh

:octocat:
View GitHub Profile
# PHP function to display protein sequence in Uniprot like format
# Author Arup Ghosh
# Use $len = 60
function processSeq($str,$len){
$arr = str_split($str,$len);
$i=1;
// The code will be improved in future revisions
foreach($arr as $bit){
$k10=str_split($bit,10);
Contents of : ftp://ussd-ftp.illumina.com/README.txt
Illumina iGenomes
The iGenomes are a collection of sequence and annotation files for commonly
analyzed genomes. Each iGenome contains data for one species, downloaded from
one source (UCSC, NCBI, or Ensembl), for one genomic build.
@arupgsh
arupgsh / pubmed_search.py
Last active May 22, 2021 15:38
Get_PMIDs
from Bio import Entrez
Entrez.email = "yourmail@gmail.com"
handle = Entrez.esearch(db="pubmed", term="cancer", retmax="10", sort="relevance", retmode="xml")
records = Entrez.read(handle)
print records["IdList"]
@arupgsh
arupgsh / pub_med.py
Created February 21, 2018 05:41 — forked from ehazlett/pub_med.py
Search PubMed with BioPython
#!/usr/bin/env python
# numpy and biopython are required -- pip install numpy biopython
from Bio import Entrez
from Bio import Medline
MAX_COUNT = 10
TERM = 'Tuberculosis'
print('Getting {0} publications containing {1}...'.format(MAX_COUNT, TERM))
@arupgsh
arupgsh / example.com
Last active February 17, 2018 19:58
Nginx server configuration for running a CodeIgniter based site with PHP-FPM. https://www.wptron.com/configure-nginx-for-codeigniter/
#Author: Arup Ghosh
#Description: https://gist.github.com/arupgsh/e50f4cd05547f0334412
#2016
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
server_name example.com www.example.com;
root /var/www/example.com/public_html/;
index index.php;
/** WPT related post widget */
function wpt_related_posts_cat() {
if ( is_single ( ) ) {
global $post;
$count = 1;
$postIDs = array( $post->ID );
$related = '';
$cats = wp_get_post_categories($post->ID );
$catIDs = array( );{
foreach ( $cats as $cat ) {
print "Enter PDB File Name:";
$pdbn=<STDIN>;
print "Enter Output PDB File Name:";
$pdbo=<STDIN>;
print "Enter Chain Para 1:";
$pdbc1=<STDIN>;
print "Enter Chain Para 2:";
$pdbc2=<STDIN>;
print "Enter RES Para 1:";
$pdbr1=<STDIN>;
/** Customize the post footer function by wptron */
add_filter('genesis_post_meta', 'wpt_info_filter');
function wpt_info_filter($entry_footer) {
if (!is_page()) {
$entry_footer = '[post_categories]';
}
return $entry_footer;
}
/** Customize the post header function by wptron */
add_filter('genesis_post_info', 'wpt_info_filter');
function wpt_info_filter($post_info) {
if (!is_page()) {
$post_info = 'Written by [post_author_posts_link] [post_comments] [post_edit]';
}
return $post_info;
}