Correlation analysis (zhuantie)

Read more

Data Binning and Plotting

In statistics, data binning is a way to categorize a number of continuous values into a smaller number of buckets (bins). Each bucket defines an numerical interval. For example, if there is a variable about house-based education levels which are measured by continuous values ranged between 0 and 19, data binning will place each value into one bucket if the value falls into the interval that the bucket covers. This post shows data binning in R as well as visualizing the bins.

The dataset contains 32038 observations for mean education level per house. Load the data into R.

data <- read.[......]

Read more

Histograms and Density Plots

Histograms and Density Plots

Histograms

You can create histograms with the function hist(x) where x is a numeric vector of values to be plotted. The option freq=FALSE plots probability densities instead of frequencies. The option breaks= controls the number of bins.

# Simple Histogram
hist(mtcars$mpg)

simple histogram click to view

# Colored Histogram with Different Number of Bins
hist(mtcars$mpg, breaks=12, col="red")

colored histogram click to view

# Add a Normal Curve (Thanks to Peter Dalgaard)
x <- mtcars$mpg
h<-hist(x, breaks=10, col="red", xlab="Miles Per Gallon",
main="Histogram with Normal[......]

Read more

meta realted paper (转贴)

文章:Accurate binning of metagenomic contigs via automated clustering sequences using information of genomic signatures and marker genes  2016 (https://www.ncbi.nlm.nih.gov/pubmed/27067514

文章:MetaCRAM: an integrated pipeline for metagenomic taxonomy identification and compression 2016

http://www.ncbi.nlm.nih.gov/pubmed/26895947

文章:Evaluating the Quantitative Capabilities of Metagenomic Analysis Software 2016 (http://www.ncbi.nlm.nih.gov/pubmed/26831696

文章:MaxBin 2.0: an automated binning algorithm to recover genomes from multiple metagenomic datasets  2016  (http://www.ncbi.nlm.n[……]

Read more

Python多版本pip安装库的问题(转)

机器上总是会有Python2.7的版本和Python3.x的版本,今天接触到一台服务器上面有Python2.7和Python3.4,想在Python3.4下安装一个TensorFlow,但不管怎么装都只能装到Python2.7上,特别头疼,后来发现是因为不论用pip还是pip3,都是指向的Python2.7。

查看pip指向

按照这篇博客中说的方法,检查了一遍pip和pip3分别指向的Python:

$ pip -V

$ pip3 -V
1
2
3
发现居然都指向了Python2.7:

怪不得怎么装都是装到了Python2.7环境下。

所以我们的问题变成了怎么通过pip去指定安装到Python3.x下。
怪不得怎么装都是装到了Python2.7环境下。

所以我们的问题变成了怎么通过pip去指定安装到Python3.x下。

解决方案

更改pip3指向
一种方法是更改pip与pip3其中一个的指向,一般pip指向Python2.7,pip3指向Python3.x。这种方法可以一劳永逸地让之后的pip3安装都顺利一点,方法参考这篇博客。我并没有用这种方法,所以也没实测。

强制安装到Python3.x环境下
如果我们直接用命令“pip3 install <库名>”,那么是默认安装到pip3指向的Pytho[……]

Read more

ARGs-OAP: 抗性基因在线分析工具(转)

ARGs_OAP_v2.0(步骤1):https://github.com/biofuture/Ublastx_stageone
ARGs-OAP在线分析网站(步骤2): http://smile.hku.hk/SARGs

无处不在的抗性基因
图片.png

环境中抗生素抗性基因(ARGs)的来源:
随机突变或表达潜在抗性基因等方式使细菌体内基因组上存在的抗性基因原型、准抗性基因或潜在抗性基因被表达出来,从而使细菌获得的抗生素抗性。
抗生素在人和动物肠道内诱导产生耐药菌,这些编码ARGs的耐药菌经由粪便排出并进入环境中,是环境中ARGs的重要来源。
抗性基因的水平转移是抗性基因在环境中传播的的主要机制,通过将包含抗性基因的质粒、转座子、整合子作为载体,通过细菌之间细胞与细胞的接触,将抗性基因从载体细胞转移到受体细胞。

如何检测环境中抗生素抗性基因(ARGs):
  • PCR技术—定性。
  • qPCR技术—定量。
  • 宏基因组测序:以环境样品中的整个微生物群体基因组为研究对象,检测环境样本微生物中的物种组成、丰度,基因预测、基因丰度,利用数据库进行注释,得到样本中ARGs的种类和丰度与样本的相关性。
  • ARDB数据库:主要包含细菌病原菌的多种抗性基因数据,不能为环境样本宏基因组数据提供详[……]

Read more

pronunciation

发音第一个 n 带鼻音

analysis    (noun single  )

analyses (noun)  (multiplex number of analysis)

动词

analyse  a’ n(ə)lʌɪz          发音a 不带鼻音

th 在尾巴 发 f

thanks

中间ch发k的时候要弱化发音

tmap install

 

1199 git clone https://github.com/GPZ-Bioinfo/tmap.git
1200 cd tmap
1201 ll
1202 python setup.py install
1203 ll
1204 cd ../
1205 rm -rf tmap
1206 deactivate
1207 rmvirtualenv tmap_ENV
1208 mkvirtualenv -p /usr/bin/python3.4m tmap_ENV

pip3 install pypiwin32

conda install scipy

sudo pip3 install matplotlib

 

cloud cmd install

 

 

 

Install

The installation of file manager is very simple.

  • install latest version of node.js.
  • install cloudcmd via npm with:
npm i cloudcmd -g

When in trouble use:

npm i cloudcmd -g --force

sudo vi /usr/lib/node_modules/cloudcmd/json/config.json

“dirStorage”: false,
“online”: true,
“open”: false,
“keysPanel”: true,
“port”: 8080,
“ip”: “143.89.31.17”,
“root”: “/”,
“prefix”: “”,
“progress”: true,
“contact”: true,
“confirmCopy”: true,
“confirmMove”: true,
“configDialog”: true,
“oneFilePanel”: false,
“console”: true,
“syncC[……]

Read more

Basic Usage of tmap

import sklearn

import plotly.plotly as py
import plotly.graph_objs as go

import matplotlib.pyplot as plt
import numpy as np

from sklearn.cluster import DBSCAN
from sklearn import metrics
from sklearn.datasets.samples_generator import make_blobs
from sklearn.preprocessing import StandardScaler




###################################
# Load libraries
from sklearn import datasets
from sklearn.preprocessing import StandardScaler
from sklearn.cluster import DBSCAN
from sklearn.preprocessing import MinMaxScaler

###################################



shenzy@SZYENVS:~/[......]

Read more