Wednesday, November 15, 2017

remove index.php

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]

http://www.phpcodify.com/remove-index-php-from-codeigniter-url/

Tuesday, November 14, 2017

nginx

sudo service nginx stop

sudo systemctl restart apache2

Tuesday, July 11, 2017

VM static IP

http://coding4streetcred.com/blog/post/VirtualBox-Configuring-Static-IPs-for-VMs

Monday, July 10, 2017

xorg.conf

afu@afu-denovo:/media/afu/QUICK_DATA/CUDA_SAMPLE/NVIDIA_CUDA-8.0_Samples/bin/x86_64/linux/release$ lspci | grep VGA
01:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)
02:00.0 VGA compatible controller: NVIDIA Corporation Device 1b06 (rev a1)


Section "ServerLayout"
    Identifier     "default"
    Screen      0  "Screen0" 0 0
    Screen      1  "Screen1" RightOf "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Module"
SubSection  "extmod"
      Option    "omit XFree86-DGA"   # don't initialise the DGA extension
EndSubSection
# most of these get loaded automatically with the newer Xorgs.
#    Load           "dbe"
#    Load           "glx"
#    Load           "dri"
#    Load           "dri2"
     Load           "extmod"
#    Load           "fbdevhw"
#    Load           "int10"
EndSection

Section "ServerFlags"
    Option         "Xinerama" "1"
    Option         "AutoAddDevices" "False"
    Option         "AutoEnableDevices" "False"
    Option         "AllowEmptyInput" "False"
EndSection

Section "Monitor"
# Samsung TFT Monitor (scr-1.0)
    Identifier     "Samsung0"
    VendorName     "Samsung"
    ModelName      "SyncMaster 2243WM"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Monitor"
# Samsung TFT Monitor (scr-1.0)
    Identifier     "Samsung1"
    VendorName     "Samsung"
    ModelName      "SyncMaster 2243WM"
    HorizSync       30.0 - 81.0
    VertRefresh     56.0 - 75.0
    Option         "DPMS"
EndSection

Section "Device"
# primary card
    Identifier     "VideocardA(upperDVI)"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 7100 GS"
    BusID          "PCI:1:0:0"
EndSection

Section "Device"
# secondary card
    Identifier     "VideocardB(lowerDVI)"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 7300 SE/7200 GS"
    BusID          "PCI:2:0:0"
EndSection

Section "Device"
# secondary card
    Identifier     "VideocardB(lowerVGA)"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 7300 SE/7200 GS"
    BusID          "PCI:2:0:0"
EndSection

Section "Device"
# primary card
    Identifier     "VideocardA(upperVGA)"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
    BoardName      "GeForce 7100 GS"
    BusID          "PCI:1:0:0"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "VideocardA(upperDVI)"
    Monitor        "Samsung0"
    DefaultDepth    24
    Option         "RenderAccel" "On"
    Option         "HWcursor" "On"
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: 1680x1050 +0+0"
    Option         "DamageEvents" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Screen"
    Identifier     "Screen1"
    Device         "VideocardB(lowerDVI)"
    Monitor        "Samsung1"
    DefaultDepth    24
    Option         "RenderAccel" "On"
    Option         "HWcursor" "On"
    Option         "TwinView" "0"
    Option         "metamodes" "DFP-0: 1680x1050 +0+0"
    Option         "DamageEvents" "True"
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection

Section "Extensions"
# optional Composite section:
# I dunno if it actually does anything
    Option         "Composite" "Disable"
EndSection

Wednesday, July 5, 2017

install cuda-kits-8.0 with NV driver-381

find . -type f -exec sed -i 's/UBUNTU_PKG_NAME = "nvidia-367"/UBUNTU_PKG_NAME = "nvidia-381"/g' '{}' \;

find . -type f -execdir sed -i 's/UBUNTU_PKG_NAME = "nvidia-367"/UBUNTU_PKG_NAME = "nvidia-381"/g' '{}' \;


pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp27-none-linux_x86_64.whl

Friday, June 30, 2017

using usb or cd to rescue ruined ubuntu

sudo fdisk -l

find out the disk you want to mount

then

sudo mount /dev/YOUR-DISK /mnt

sudo chroot /mnt

then you have the permission to operate on that disk


text mode

ubuntu@ubuntu:/$ sudo systemctl get-default
graphical.target
ubuntu@ubuntu:/$ sudo systemctl set-default graphical.target
Created symlink from /etc/systemd/system/default.target to /lib/systemd/system/graphical.target.
ubuntu@ubuntu:/$ sudo systemctl get-default
graphical.target


Thursday, June 22, 2017

data structure

sed 's/cv=0/cv=1/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures1.py
sed 's/cv=0/cv=2/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures2.py
sed 's/cv=0/cv=3/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures3.py
sed 's/cv=0/cv=4/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures4.py
sed 's/cv=0/cv=5/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures5.py
sed 's/cv=0/cv=6/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures6.py
sed 's/cv=0/cv=7/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures7.py
sed 's/cv=0/cv=8/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures8.py
sed 's/cv=0/cv=9/g' Stage2_GenerateFeatures0.py > Stage2_GenerateFeatures9.py

mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Allergen/PubMed_IDs
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Autoimm/PubMed_IDs
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Cancer/PubMed_IDs
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Infectious_Disease/PubMed_IDs
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Other/PubMed_IDs
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Transplant/PubMed_IDs

mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Allergen/Training_Sets
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Autoimm/Training_Sets
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Cancer/Training_Sets
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Infectious_Disease/Training_Sets
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Other/Training_Sets
mkdir -p /mnt/BioAdHoc/Users/zfu/2014_Retrain_Classifier/Stage3.Data/Transplant/Training_Sets

sed 's/Features0/Features1/g' Stage3_GenerateFeatures0.sh > Stage3_GenerateFeatures1.sh
sed 's/Features0/Features2/g' Stage3_GenerateFeatures0.sh > Stage3_GenerateFeatures2.sh
sed 's/Features0/Features3/g' Stage3_GenerateFeatures0.sh > Stage3_GenerateFeatures3.sh
sed 's/Features0/Features4/g' Stage3_GenerateFeatures0.sh > Stage3_GenerateFeatures4.sh


sed 's/cv=0/cv=1/g' Stage3_GenerateFeatures0.py > Stage3_GenerateFeatures1.py
sed 's/cv=0/cv=2/g' Stage3_GenerateFeatures0.py > Stage3_GenerateFeatures2.py
sed 's/cv=0/cv=3/g' Stage3_GenerateFeatures0.py > Stage3_GenerateFeatures3.py
sed 's/cv=0/cv=4/g' Stage3_GenerateFeatures0.py > Stage3_GenerateFeatures4.py



Friday, May 12, 2017

update sqlite

sqlite> select * from analysis where analysis_ID = '003327';
003327|Mapping|2017-05-05|pramod@lji@lji.org,nriley@lji.org|/mnt/overflow/NGSAnalyses/RNA-Seq/Mapping/003327_Ley_EE_samples_SR50_Combo|Ley_EE_samples_SR50_Combo|0|/mnt/Hiseq2500/170201_K00180_0308_BHGGMHBBXX_SR50_Combo

sqlite> update analysis set location="/mnt/NGSAnalyses/RNA-Seq/Mapping/003327_Ley_EE_samples_SR50_Combo" where analysis_ID='003327';
sqlite> select * from analysis where analysis_ID = '003327';
003327|Mapping|2017-05-05|pramod@lji@lji.org,nriley@lji.org|/mnt/NGSAnalyses/RNA-Seq/Mapping/003327_Ley_EE_samples_SR50_Combo|Ley_EE_samples_SR50_Combo|0|/mnt/Hiseq2500/170201_K00180_0308_BHGGMHBBXX_SR50_Combo

Monday, April 3, 2017

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD5000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD5000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD7500.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD7500.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD10000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD10000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD12500.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD12500.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD15000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD15000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD5000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD5000.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD7500.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD7500.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD10000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD10000.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD12500.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD12500.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/SRR1422897.extend158/SD15000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_MAPPING_SD15000.TEZS2500.tsv &


python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD5000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD5000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD7500.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD7500.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD10000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD10000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD12500.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD12500.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD15000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD15000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD5000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD5000.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD7500.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD7500.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD10000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD10000.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD12500.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD12500.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/W500D750E3L4/JEM.K27AC/SD15000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/JEM_TFH_MAPPING_SD15000.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD5000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD5000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD7500.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD7500.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD10000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD10000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD12500.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD12500.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD15000.TEZS0 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD15000.TEZS0.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD5000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD5000.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD7500.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD7500.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD10000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD10000.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD12500.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD12500.TEZS2500.tsv &

python annotating.allpeak.V1.py /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/04.ROSE/FromGEO/GEO.BLODD_TFH/SD15000.TEZS2500 /mnt/overflow/BioAdHoc/Users/zfu/2016_Choi_NonGCTFH_SE/05.SE_Association/BLOOD_TFH_GEO_SD15000.TEZS2500.tsv &


Friday, March 24, 2017

sed 's/SD12500/SD7500/g; s/-s 12500/-s 7500/g' ROSE.JEM.K27AC.GEO.SD12500.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD7500.TEZS2500.sh

sed 's/SD12500/SD10000/g; s/-s 12500/-s 10000/g' ROSE.JEM.K27AC.GEO.SD12500.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD10000.TEZS2500.sh

sed 's/SD12500/SD15000/g; s/-s 12500/-s 15000/g' ROSE.JEM.K27AC.GEO.SD12500.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD15000.TEZS2500.sh

sed 's/SD12500/SD5000/g; s/-s 12500/-s 5000/g' ROSE.JEM.K27AC.GEO.SD12500.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD5000.TEZS2500.sh


qsub ROSE.JEM.K27AC.GEO.SD7500.TEZS2500.sh

qsub ROSE.JEM.K27AC.GEO.SD10000.TEZS2500.sh

qsub ROSE.JEM.K27AC.GEO.SD15000.TEZS2500.sh

qsub ROSE.JEM.K27AC.GEO.SD5000.TEZS2500.sh



sed 's/-t 2500/-t 0/g; s/TEZS2500/TEZS0/g' ROSE.JEM.K27AC.GEO.SD5000.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD5000.TEZS0.sh
sed 's/-t 2500/-t 0/g; s/TEZS2500/TEZS0/g' ROSE.JEM.K27AC.GEO.SD7500.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD7500.TEZS0.sh
sed 's/-t 2500/-t 0/g; s/TEZS2500/TEZS0/g' ROSE.JEM.K27AC.GEO.SD10000.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD10000.TEZS0.sh
sed 's/-t 2500/-t 0/g; s/TEZS2500/TEZS0/g' ROSE.JEM.K27AC.GEO.SD12500.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD12500.TEZS0.sh
sed 's/-t 2500/-t 0/g; s/TEZS2500/TEZS0/g' ROSE.JEM.K27AC.GEO.SD15000.TEZS2500.sh > ROSE.JEM.K27AC.GEO.SD15000.TEZS0.sh

qsub ROSE.JEM.K27AC.GEO.SD5000.TEZS0.sh
qsub ROSE.JEM.K27AC.GEO.SD7500.TEZS0.sh
qsub ROSE.JEM.K27AC.GEO.SD10000.TEZS0.sh
qsub ROSE.JEM.K27AC.GEO.SD12500.TEZS0.sh
qsub ROSE.JEM.K27AC.GEO.SD15000.TEZS0.sh

Tuesday, February 28, 2017

Kaggle Bosch test

import numpy as np
import pandas as pd
import xgboost as xgb
import time
import random
from sklearn.model_selection import StratifiedKFold

#For sampling rows from input file
random_seed = 9
subset = 0.4

n_rows = 1183747;
train_rows = int(n_rows * subset)
random.seed(random_seed)
skip = sorted(random.sample(xrange(1,n_rows + 1),n_rows-train_rows))
data = pd.read_csv("/home/zfu/Kaggle/bosch/train_numeric.csv", index_col=0, dtype=np.float32, skiprows=skip)
y = data['Response'].values
del data['Response']
X = data.values

# GPU

param = {}
param['objective'] = 'binary:logistic'
param['eval_metric'] = 'auc'
param['max_depth'] = 5
param['eta'] = 0.3
param['silent'] = 0
param['updater'] = 'grow_gpu'
#param['updater'] = 'grow_colmaker'

num_round = 20

In [18]: i = 1
    ...: 
    ...: for train_index, test_index in skf.split(X, y):
    ...: ^Iprint("TRAIN:", train_index, "TEST:", test_index)
    ...: ^IX_train, X_test = X[train_index], X[test_index]
    ...: ^Iy_train, y_test = y[train_index], y[test_index]
    ...: ^Idtrain = xgb.DMatrix(X_train, label=y_train)
    ...: ^Itmp = time.time()
    ...: ^Ibst = xgb.train(param, dtrain, num_round)
    ...: ^Iboost_time = time.time() - tmp
    ...: ^Ires = bst.eval(xgb.DMatrix(X_test, label=y_test))
    ...: ^Iprint("Fold {}: {}, Boost Time {}".format(i, res, str(boost_time)))
    ...: ^Idel bst
    ...: ^Ii = i + 1
    ...:  
('TRAIN:', array([ 94682,  94683,  94684, ..., 473495, 473496, 473497]), 'TEST:', array([    0,     1,     2, ..., 97097, 97390, 97619]))
[00:48:52] Allocated 2651/8022 MB on GeForce GTX 1070
Fold 1: [0] eval-auc:0.687818, Boost Time 13.2141840458
('TRAIN:', array([     0,      1,      2, ..., 473495, 473496, 473497]), 'TEST:', array([ 94682,  94683,  94684, ..., 191560, 191830, 191922]))
[00:49:07] Allocated 2649/8006 MB on GeForce GTX 1070
Fold 2: [0] eval-auc:0.699430, Boost Time 9.08604192734
('TRAIN:', array([     0,      1,      2, ..., 473495, 473496, 473497]), 'TEST:', array([189390, 189391, 189392, ..., 286293, 286337, 286657]))
[00:49:21] Allocated 2650/8006 MB on GeForce GTX 1070
Fold 3: [0] eval-auc:0.679230, Boost Time 9.11538410187
('TRAIN:', array([     0,      1,      2, ..., 473495, 473496, 473497]), 'TEST:', array([284088, 284089, 284090, ..., 379736, 379934, 380831]))
[00:49:35] Allocated 2648/8006 MB on GeForce GTX 1070
Fold 4: [0] eval-auc:0.682657, Boost Time 9.08212804794
('TRAIN:', array([     0,      1,      2, ..., 379736, 379934, 380831]), 'TEST:', array([378786, 378787, 378788, ..., 473495, 473496, 473497]))
[00:49:49] Allocated 2650/8006 MB on GeForce GTX 1070

Fold 5: [0] eval-auc:0.698049, Boost Time 9.16434597969


# CPU

param = {}
param['objective'] = 'binary:logistic'
param['eval_metric'] = 'auc'
param['max_depth'] = 5
param['eta'] = 0.3
param['silent'] = 0
#param['updater'] = 'grow_gpu'
param['updater'] = 'grow_colmaker'

num_round = 20

In [20]: i = 1
    ...: 
    ...: for train_index, test_index in skf.split(X, y):
    ...: ^Iprint("TRAIN:", train_index, "TEST:", test_index)
    ...: ^IX_train, X_test = X[train_index], X[test_index]
    ...: ^Iy_train, y_test = y[train_index], y[test_index]
    ...: ^Idtrain = xgb.DMatrix(X_train, label=y_train)
    ...: ^Itmp = time.time()
    ...: ^Ibst = xgb.train(param, dtrain, num_round)
    ...: ^Iboost_time = time.time() - tmp
    ...: ^Ires = bst.eval(xgb.DMatrix(X_test, label=y_test))
    ...: ^Iprint("Fold {}: {}, Boost Time {}".format(i, res, str(boost_time)))
    ...: ^Idel bst
    ...: ^Ii = i + 1
    ...:  
('TRAIN:', array([ 94682,  94683,  94684, ..., 473495, 473496, 473497]), 'TEST:', array([    0,     1,     2, ..., 97097, 97390, 97619]))
Fold 1: [0] eval-auc:0.691973, Boost Time 30.7943990231
('TRAIN:', array([     0,      1,      2, ..., 473495, 473496, 473497]), 'TEST:', array([ 94682,  94683,  94684, ..., 191560, 191830, 191922]))
Fold 2: [0] eval-auc:0.702624, Boost Time 28.8307631016
('TRAIN:', array([     0,      1,      2, ..., 473495, 473496, 473497]), 'TEST:', array([189390, 189391, 189392, ..., 286293, 286337, 286657]))
Fold 3: [0] eval-auc:0.669979, Boost Time 28.8397688866
('TRAIN:', array([     0,      1,      2, ..., 473495, 473496, 473497]), 'TEST:', array([284088, 284089, 284090, ..., 379736, 379934, 380831]))
Fold 4: [0] eval-auc:0.674863, Boost Time 28.8023629189
('TRAIN:', array([     0,      1,      2, ..., 379736, 379934, 380831]), 'TEST:', array([378786, 378787, 378788, ..., 473495, 473496, 473497]))

Fold 5: [0] eval-auc:0.696640, Boost Time 30.3664522171



Saturday, February 25, 2017

public ip address

[zfu@gpu-0-0 ~]$ dig +short myip.opendns.com @resolver1.opendns.com

8.37.117.238


Tuesday, February 7, 2017

fastqc command

/mnt/apps/FastQC/FastQC-0.11.2/fastqc --contaminants /mnt/BioAdHoc/Users/zfu/packages/FastQC/Configuration/contaminants_LJI.txt -o /mnt/overflow/NGSAnalyses/QC/QC_Validation/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/28_C1_038_C50_N705S502 -t 2 /mnt/overflow/BioAdHoc/Users/zfu/2017_Trimming/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/28_C1_038_C50_N705S502/BeforeTrimming.28_C1_038_C50_N705S502_R1.fastq.gz

/mnt/apps/FastQC/FastQC-0.11.2/fastqc --contaminants /mnt/BioAdHoc/Users/zfu/packages/FastQC/Configuration/contaminants_LJI.txt --casava -o /mnt/overflow/BioAdHoc/Users/zfu/2017_Trimming/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/output/28_C1_038_C50_N705S502 -t 2 /mnt/overflow/BioAdHoc/Users/zfu/2017_Trimming/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/28_C1_038_C50_N705S502/28_C1_038_C50_N705S502_GGACTCCT-CTCTCTAT_L002_R2_001.fastq.gz

/mnt/apps/FastQC/FastQC-0.11.2/fastqc --contaminants /mnt/BioAdHoc/Users/zfu/packages/FastQC/Configuration/contaminants_LJI.txt -o /mnt/overflow/NGSAnalyses/QC/QC_Validation/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/28_C1_038_C50_N705S502 -t 2 /mnt/overflow/BioAdHoc/Users/zfu/2017_Trimming/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/28_C1_038_C50_N705S502/BeforeTrimming.28_C1_038_C50_N705S502_R2.fastq.gz


/mnt/apps/FastQC/FastQC-0.11.2/fastqc --contaminants /mnt/BioAdHoc/Users/zfu/packages/FastQC/Configuration/contaminants_LJI.txt -o /mnt/overflow/NGSAnalyses/QC/QC_Validation/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/28_C1_038_C50_N705S502 -t 2 /mnt/overflow/BioAdHoc/Users/zfu/2017_Trimming/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/trimmed/28_C1_038_C50_N705S502/AfterTrimming.28_C1_038_C50_N705S502_R1.fastq.gz

/mnt/apps/FastQC/FastQC-0.11.2/fastqc --contaminants /mnt/BioAdHoc/Users/zfu/packages/FastQC/Configuration/contaminants_LJI.txt -o /mnt/overflow/NGSAnalyses/QC/QC_Validation/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/28_C1_038_C50_N705S502 -t 2 /mnt/overflow/BioAdHoc/Users/zfu/2017_Trimming/160804_D00361_0380_AHK3VCBCXX_8_4_16_GrSe60B_AaMi_150x150/trimmed/28_C1_038_C50_N705S502/AfterTrimming.28_C1_038_C50_N705S502_R2.fastq.gz

Thursday, January 26, 2017

sed ROSE command

sed 's/SD5000/SD7500/g; s/-s 5000/-s 7500/g' ROSE.SRR1422897.extend158.SD5000.TEZS0.sh > ROSE.SRR1422897.extend158.SD7500.TEZS0.sh
sed 's/SD5000/SD10000/g; s/-s 5000/-s 10000/g' ROSE.SRR1422897.extend158.SD5000.TEZS0.sh > ROSE.SRR1422897.extend158.SD10000.TEZS0.sh
sed 's/SD5000/SD12500/g; s/-s 5000/-s 12500/g' ROSE.SRR1422897.extend158.SD5000.TEZS0.sh > ROSE.SRR1422897.extend158.SD12500.TEZS0.sh
sed 's/SD5000/SD15000/g; s/-s 5000/-s 15000/g' ROSE.SRR1422897.extend158.SD5000.TEZS0.sh > ROSE.SRR1422897.extend158.SD15000.TEZS0.sh

qsub ROSE.SRR1422897.extend158.SD7500.TEZS0.sh
qsub ROSE.SRR1422897.extend158.SD10000.TEZS0.sh
qsub ROSE.SRR1422897.extend158.SD12500.TEZS0.sh
qsub ROSE.SRR1422897.extend158.SD15000.TEZS0.sh


sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422897.extend158.SD5000.TEZS0.sh > ROSE.SRR1422897.extend158.SD5000.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422897.extend158.SD7500.TEZS0.sh > ROSE.SRR1422897.extend158.SD7500.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422897.extend158.SD10000.TEZS0.sh > ROSE.SRR1422897.extend158.SD10000.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422897.extend158.SD12500.TEZS0.sh > ROSE.SRR1422897.extend158.SD12500.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422897.extend158.SD15000.TEZS0.sh > ROSE.SRR1422897.extend158.SD15000.TEZS2500.sh

qsub ROSE.SRR1422897.extend158.SD5000.TEZS2500.sh
qsub ROSE.SRR1422897.extend158.SD7500.TEZS2500.sh
qsub ROSE.SRR1422897.extend158.SD10000.TEZS2500.sh
qsub ROSE.SRR1422897.extend158.SD12500.TEZS2500.sh
qsub ROSE.SRR1422897.extend158.SD15000.TEZS2500.sh



sed 's/SD5000/SD7500/g; s/-s 5000/-s 7500/g' ROSE.SRR1422893.extend158.SD5000.TEZS0.sh > ROSE.SRR1422893.extend158.SD7500.TEZS0.sh
sed 's/SD5000/SD10000/g; s/-s 5000/-s 10000/g' ROSE.SRR1422893.extend158.SD5000.TEZS0.sh > ROSE.SRR1422893.extend158.SD10000.TEZS0.sh
sed 's/SD5000/SD12500/g; s/-s 5000/-s 12500/g' ROSE.SRR1422893.extend158.SD5000.TEZS0.sh > ROSE.SRR1422893.extend158.SD12500.TEZS0.sh
sed 's/SD5000/SD15000/g; s/-s 5000/-s 15000/g' ROSE.SRR1422893.extend158.SD5000.TEZS0.sh > ROSE.SRR1422893.extend158.SD15000.TEZS0.sh

qsub ROSE.SRR1422893.extend158.SD7500.TEZS0.sh
qsub ROSE.SRR1422893.extend158.SD10000.TEZS0.sh
qsub ROSE.SRR1422893.extend158.SD12500.TEZS0.sh
qsub ROSE.SRR1422893.extend158.SD15000.TEZS0.sh

sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422893.extend158.SD5000.TEZS0.sh > ROSE.SRR1422893.extend158.SD5000.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422893.extend158.SD7500.TEZS0.sh > ROSE.SRR1422893.extend158.SD7500.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422893.extend158.SD10000.TEZS0.sh > ROSE.SRR1422893.extend158.SD10000.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422893.extend158.SD12500.TEZS0.sh > ROSE.SRR1422893.extend158.SD12500.TEZS2500.sh
sed 's/-t 0/-t 2500/g; s/TEZS0/TEZS2500/g' ROSE.SRR1422893.extend158.SD15000.TEZS0.sh > ROSE.SRR1422893.extend158.SD15000.TEZS2500.sh

qsub ROSE.SRR1422893.extend158.SD5000.TEZS2500.sh
qsub ROSE.SRR1422893.extend158.SD7500.TEZS2500.sh
qsub ROSE.SRR1422893.extend158.SD10000.TEZS2500.sh
qsub ROSE.SRR1422893.extend158.SD12500.TEZS2500.sh
qsub ROSE.SRR1422893.extend158.SD15000.TEZS2500.sh