Bash script for batch work

#!/bin/bash #PBS -l walltime=96:00:00,nodes=8:ppn=10 #PBS -N kofamscan source activate hybrid_assembly #SC9523_extract_paired_1.fasta.fastq_matchedmeghitresult #metawrap binning -o /home/mhyleung/workspace/loreal_shotgun2/NovaSeq_new/metawrap_assembly_R2/LOR303C -t 16 -a /home/mhyleung/worksp[……]

Read more

[…]

wilcox 检验批处理示例

https://cloud.tencent.com/developer/article/1666764 #GRID_input_new_p10 group group library(doBy) #使用其中的 summaryBy() 以方便按分组计算均值、中位数 #读取数据 gene <- read.table('gene.txt', sep = '\t', row.names = 1, header = TRUE, stringsAsFactors = FALSE, check.names = FALSE) group <- read.table('group.t[......]

Read more

[…]

Get statistics for each group (such as count, mean, etc) using pandas GroupBy?


Quick Answer:

The simplest way to get row counts per group is by calling .size(), which returns a Series:

df.groupby(['col1','col2']).size() 

Usually you want this result as a DataFrame (instead of a Series) so you can do:

df.groupby(['col1', 'col2']).size().reset_index(name='counts') 

If you[……]

Read more

[…]

肠型分析学习

肠型,Enterotype,是2011年在这篇文章中提出的,即将过去的2018年又有20多们肠道微生物的大佬对肠型的概念进行了回顾和确认。一直比较好奇怎样来用代码分析肠型,今天找到了这个教程,放在这:

这是那篇原始的文章:Arumugam, M., Raes, J., et al. (2011) Enterotypes of the human gut microbiome, Nature,doi://10.1038/nature09944 在谷歌上一搜,作者竟然做了个分析肠型的教程在这,学习一下:http://enterotyping.embl.de/enterotypes.html 这是[……]

Read more

[…]

conda 报错 Solving environment: failed

现在说说我的解决思路: 1.根据错误内容,安装失败的原因应该是这个网址 https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2 请求失败。 2.所以我尝试用 wget https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2 1 手动下载这个包,结果出现以下错误。 -2018-12-12 18:29:18– https://repo.anaconda.com/pkgs/main/noarch/repodata.json.bz2 Connect[……]

Read more

[…]

ssh, scp and rsync

rsync -P –rsh=ssh -r biostack@143.89.31.17:/home/biostack/work/two_samples ./   [Admin.DESKTOP-7JT504C] ➤ rsync -P –rsh=ssh /drives/d/Kraken_12.tar.gz cityu_jhli_1@172.16.22.11:/BIGDATA1/cityu_jhli_1/mhyleung/database/findfungi Warning: Permanently added ‘172.16.22.11’ (RSA) to the list[……]

Read more

[…]

v2ray

https://github.com/Jrohy/multi-v2ray  

Docker运行

默认创建mkcp + 随机一种伪装头配置文件:

docker run -d --name v2ray --privileged --restart always --network host jrohy/v2ray 

自定义v2ray配置文件:

docker run -d --name v2ray --privileged -v /path/config.json:/etc/v2ray/config.json --restart always --network host[......]

Read more

[…]

Multivariate analyses in R (PERMANOVA )

https://rpubs.com/collnell/manova

Multivariate analyses in R

By C Nell

Types of questions

Do groups differ in composition? Does community structure vary among regions or over time? Do environmental variables explain community patterns? Which species are responsible for differences among g[……]

Read more

[…]

Good software

multiqc ranger ployly https://github.com/MultiQC https://github.com/ranger/ranger https://zhuanlan.zhihu.com/p/34369349 […]

R drawing png with high resolution

可重复的示例:

the_plot <- function() { x <- seq(0, 1, length.out = 100) y <- pbeta(x, 1, 10) plot( x, y, xlab = "False Positive Rate", ylab = "Average true positive rate", type = "l" ) }

 

png( "test.png", width = 3.25, height = 3.25,[......]

Read more

[…]