sh 再现Bray Nat Prot 2016

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 再现Bray Nat Prot 2016相关的知识,希望对你有一定的参考价值。

wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh

bash Miniconda2-latest-Linux-x86_64.sh

#log out and log back in

conda create -n cellpntg MySQL-python numpy scipy matplotlib scikit-learn nose mock python-dateutil progressbar ipython
source activate cellpntg
pip install verlib

wget https://github.com/carpenterlab/2016_bray_natprot/raw/master/supplementary_files/seedseq.properties.gz
wget http://pubs.broadinstitute.org/bray_natprot_2016/suppl/online/seedseq_data/seedseq_per_cells.sql.gz
wget http://pubs.broadinstitute.org/bray_natprot_2016/suppl/online/seedseq_data/seedseq_per_cytoplasm.sql.gz
wget http://pubs.broadinstitute.org/bray_natprot_2016/suppl/online/seedseq_data/seedseq_per_nuclei.sql.gz
wget http://pubs.broadinstitute.org/bray_natprot_2016/suppl/online/seedseq_data/seedseq_per_image.sql.gz
wget https://github.com/carpenterlab/2016_bray_natprot/raw/master/supplementary_files/seedseq_per_object.sql.gz
wget http://pubs.broadinstitute.org/bray_natprot_2016/suppl/online/profiles.zip


sudo apt-get update 

sudo apt-get install mysql-server

/usr/bin/mysql_secure_installation

sudo service mysql start

mysql -u root

mysql> create database natprot;

mysql> exit;

parallel gunzip {} ::: `ls  *.gz`

unzip profiles.zip

time mysql -u root natprot < seedseq_per_image.sql
time mysql -u root natprot < seedseq_per_nuclei.sql 
time mysql -u root natprot < seedseq_per_cells.sql
time mysql -u root natprot < seedseq_per_cytoplasm.sql 
time mysql -u root natprot < seedseq_per_object.sql


CREATE INDEX table_image_object_cells_idx ON MultipleHairpin_2013_03_07_Analysis_Per_Cells(ImageNumber, Cells_Number_Object_Number);
CREATE INDEX table_image_object_cytoplasm_idx ON MultipleHairpin_2013_03_07_Analysis_Per_Cytoplasm(ImageNumber, Cytoplasm_Number_Object_Number);
CREATE INDEX table_image_object_nuclei_idx ON MultipleHairpin_2013_03_07_Analysis_Per_Nuclei(ImageNumber, Nuclei_Number_Object_Number);
CREATE INDEX plate_well_image_idx ON MultipleHairpin_2013_03_07_Analysis_Per_Image(Image_Metadata_Plate(255), Image_Metadata_Well(15));

CREATE VIEW MultipleHairpin_2013_03_07_Analysis_Per_Object AS
SELECT ImageNumber as Cytoplasm.ImageNumber, ObjectNumber as Cytoplasm.Cytoplasm_Number_Object_Number, *
FROM MultipleHairpin_2013_03_07_Analysis_Per_Cells as Cells
LEFT JOIN MultipleHairpin_2013_03_07_Analysis_Per_Cytoplasm as Cytoplasm
  ON Cells.Cells_Number_Object_Number=Cytoplasm.Cytoplasm_Number_Object_Number AND Cells.ImageNumber=Cytoplasm.ImageNumber
LEFT JOIN MultipleHairpin_2013_03_07_Analysis_Per_Nuclei as Nuclei
  ON Cells.Cells_Number_Object_Number=Nuclei.Nuclei_Number_Object_Number AND Cells.ImageNumber=Nuclei.ImageNumber;

DROP VIEW MultipleHairpin_2013_03_07_Analysis_Per_Object;

CREATE VIEW MultipleHairpin_2013_03_07_Analysis_Per_Object AS 
SELECT Cytoplasm.ImageNumber,  Cytoplasm.Cytoplasm_Number_Object_Number as ObjectNumber
FROM MultipleHairpin_2013_03_07_Analysis_Per_Cells as Cells
LEFT JOIN MultipleHairpin_2013_03_07_Analysis_Per_Cytoplasm as Cytoplasm
  ON Cells.Cells_Number_Object_Number=Cytoplasm.Cytoplasm_Number_Object_Number AND Cells.ImageNumber=Cytoplasm.ImageNumber
LEFT JOIN MultipleHairpin_2013_03_07_Analysis_Per_Nuclei as Nuclei
  ON Cells.Cells_Number_Object_Number=Nuclei.Nuclei_Number_Object_Number AND Cells.ImageNumber=Nuclei.ImageNumber;

show columns from MultipleHairpin_2013_03_07_Analysis_Per_Object;
select count(*) from MultipleHairpin_2013_03_07_Analysis_Per_Object;

DROP VIEW MultipleHairpin_2013_03_07_Analysis_Per_Object;

CREATE VIEW MultipleHairpin_2013_03_07_Analysis_Per_Object AS 

select * from 

(SELECT ImageNumber, Cells.Cells_Number_Object_Number as ObjectNumber
FROM MultipleHairpin_2013_03_07_Analysis_Per_Cells as Cells) Cells
INNER JOIN
(SELECT ImageNumber, Cytoplasm.Cytoplasm_Number_Object_Number as ObjectNumber
FROM MultipleHairpin_2013_03_07_Analysis_Per_Cytoplasm as Cytoplasm) Cytoplasm
ON Cells.ImageNumber=Cytoplasm.ImageNumber AND Cells.ObjectNumber=Cytoplasm.ObjectNumber;



以上是关于sh 再现Bray Nat Prot 2016的主要内容,如果未能解决你的问题,请参考以下文章

使用 Bray-Curtis 的 nMDS - 分组绘图

sh iptable-nat.sh

XML 之父 Tim Bray:谷歌为什么要搞 Android?

nmds bray-curtis 相异指数中的 x 和 y 轴代表啥?(Vegan package R)

sh 一个shell脚本,为本地托管的nat VM创建一个8节点nat网络,通过por提供ssh,mysql,postgres和其他Web服务

再现Fisher线性判别图