Skip to content

Instantly share code, notes, and snippets.

@fo40225
fo40225 / CICERO.sh
Last active June 28, 2021 14:23
run CICERO (Clipped-reads Extended for RNA Optimization) is an assembly-based algorithm to detect diverse classes of driver gene fusions from RNA-seq.
## first, STAR
## second, RemoveDuplicates
cd ~
mkdir CICERO-reference
cd CICERO-reference
mkdir GRCh37-lite
cd GRCh37-lite
wget -O reference.tar.gz https://zenodo.org/record/3839940/files/reference.tar.gz?download=1
tar axvf reference.tar.gz
@fo40225
fo40225 / STAR-Fusion.sh
Last active June 28, 2021 14:17
STAR-Fusion
sudo apt install -y libdb-dev axel
sudo cpan DB_File URI::Escape Set::IntervalTree Carp::Assert JSON::XS PerlIO::gzip
cd ~
axel -n 50 -q https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/__genome_libs_StarFv1.10/GRCh37_gencode_v19_CTAT_lib_Mar012021.plug-n-play.tar.gz
axel -n 50 -q https://data.broadinstitute.org/Trinity/CTAT_RESOURCE_LIB/__genome_libs_StarFv1.10/GRCh38_gencode_v22_CTAT_lib_Mar012021.plug-n-play.tar.gz
tar axvf GRCh37_gencode_v19_CTAT_lib_Mar012021.plug-n-play.tar.gz
tar axvf GRCh38_gencode_v22_CTAT_lib_Mar012021.plug-n-play.tar.gz
git --recursive https://github.com/STAR-Fusion/STAR-Fusion.git -b v1.10.0
@fo40225
fo40225 / RadeonVII-pytorch.txt
Created May 1, 2020 06:57
Radeon VII ROCm pytorch transformers bert
user@ubuntu:~$ sudo docker run -it -v $HOME:/data --privileged --rm \
> --device=/dev/kfd --device=/dev/dri --group-add video \
> rocm/pytorch:rocm3.3_ubuntu16.04_py3.6_pytorch
root@4373d0a3dd33:/# apt install cabextract
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libmspack0
The following NEW packages will be installed:
@fo40225
fo40225 / RadeonVII-tensorflow.txt
Last active May 1, 2020 06:57
Radeon VII ROCm tensorflow
sudo apt update
sudo apt install libnuma-dev
wget -q -O - http://repo.radeon.com/rocm/apt/debian/rocm.gpg.key | sudo apt-key add -
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list
sudo apt update
sudo apt install rocm-dkms
sudo usermod -a -G video $LOGNAME
sudo reboot
export PATH=/opt/rocm/bin:/opt/rocm/profiler/bin:/opt/rocm/opencl/bin/x86_64:$PATH
@fo40225
fo40225 / 3700x-flops.log
Created April 24, 2020 14:09
AMD Ryzen 7 3700X Wraith Prism (H mode) ASUS TUF GAMING X570-PLUS PBO enable GFlops test
user@ubuntu:~/Flops/version3/binaries-linux$ ./2006-Core2
Running Core 2 tuned binary with 1 thread...
Single-Precision - 128-bit SSE - Add/Sub
GFlops = 34.624
Result = 4.33405e+06
Double-Precision - 128-bit SSE2 - Add/Sub
GFlops = 17.312
Result = 2.18144e+06
@fo40225
fo40225 / 3531.txt
Created April 22, 2020 01:37
AOC-S3108L-H8iR + 8x Seagate Nytro 3531 1.6TB RAID0
$ fio --loops=5 --size=1g --runtime=5 --time_based=1 --stonewall --direct=1 --group_reporting \
> --name=SeqQ8T1read --bs=1048576 --iodepth=8 --rw=read \
> --name=SeqQ8T1write --bs=1048576 --iodepth=8 --rw=write \
> --name=SeqQ1T1read --bs=1048576 --iodepth=1 --rw=read \
> --name=SeqQ1T1write --bs=1048576 --iodepth=1 --rw=write \
> --name=4kQ32T16read --bs=4096 --iodepth=32 --numjobs=16 --rw=randread \
> --name=4kQ32T16write --bs=4096 --iodepth=32 --numjobs=16 --rw=randwrite \
> --name=4kQ1T1read --bs=4096 --iodepth=1 --rw=randread \
> --name=4kQ1T1write --bs=4096 --iodepth=1 --rw=randwrite
SeqQ8T1read: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=psync, iodepth=8
@fo40225
fo40225 / pm983.log
Created April 22, 2020 01:36
Samsung PM983 1.92TB fio test
$ fio --loops=5 --size=1g --runtime=5 --time_based=1 --stonewall --direct=1 --group_reporting \
> --name=SeqQ8T1read --bs=1048576 --iodepth=8 --rw=read \
> --name=SeqQ8T1write --bs=1048576 --iodepth=8 --rw=write \
> --name=SeqQ1T1read --bs=1048576 --iodepth=1 --rw=read \
> --name=SeqQ1T1write --bs=1048576 --iodepth=1 --rw=write \
> --name=4kQ32T16read --bs=4096 --iodepth=32 --numjobs=16 --rw=randread \
> --name=4kQ32T16write --bs=4096 --iodepth=32 --numjobs=16 --rw=randwrite \
> --name=4kQ1T1read --bs=4096 --iodepth=1 --rw=randread \
> --name=4kQ1T1write --bs=4096 --iodepth=1 --rw=randwrite
SeqQ8T1read: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=psync, iodepth=8
@fo40225
fo40225 / star.sh
Last active June 28, 2021 14:17
run STAR for RNAseq
git clone https://github.com/alexdobin/STAR.git -b 2.7.9a
cd STAR/source
# edit Makefile:L35 CXXFLAGS_SIMD ?= -mavx2
# to CXXFLAGS_SIMD ?= -march=native
make STAR -j $(nproc)
sudo make install
cd ~
mkdir Gencode_human
cd Gencode_human
@fo40225
fo40225 / grub.sh
Created October 23, 2019 10:34
rescue grub uefi boot from live cd
sudo mount /dev/sda2 /mnt
sudo mkdir /mnt/boot/efi
sudo mount /dev/sda1 /mnt/boot/efi
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo cp /etc/resolv.conf /mnt/etc/resolv.conf
#### after reboot, ubuntu 18.04, sudo ln -s ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
sudo chroot /mnt
apt install -y grub-efi-amd64-bin
@fo40225
fo40225 / twcc-1gpu.txt
Created October 11, 2019 12:01
twcc-1gpu
lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 36
On-line CPU(s) list: 0-35
Thread(s) per core: 1
Core(s) per socket: 18
Socket(s): 2
NUMA node(s): 2