Skip to content

Instantly share code, notes, and snippets.

View suimye's full-sized avatar

Masaki Suimye Morioka suimye

View GitHub Profile
#!/bin/sh
FL=`ls`
for files in $FL;
do
if [[ "$files" =~ ".bw" ]];then
newfile1=$(echo $files | sed 's/[\,|\ |\:|\(|\)|\^]/\./g;')
newfile2=$(echo $newfile1 | sed 's/\.\./\./g;')
@suimye
suimye / gist:d8edec74cce9ecad86cd
Last active April 2, 2020 12:15
For retrieving fastq file from NCBI GEO using GSM number.
#!/bin/sh
if ! type "efetch" > /dev/null; then
print "Please install E-utilitie."
fi
GSM_LIST=$1
GSMs=`cat $GSM_LIST|cut -f1`
#echo $SRRs
! type "foo" > /dev/null 2>&1;
for GSM in $GSMs; do
@suimye
suimye / file0.txt
Last active August 2, 2019 02:44
行数、列数が不均一なデータをRで読み込む ref: https://qiita.com/suimye/items/af3686990abc139c04eb
rl <- readLines(con="./c3.all.v5.0.symbols.gmt.txt") #readlineによる行データの読み込み
gs_list <- list()  #list準備 
for(i in 1:length(rl)){
dl <- unlist(strsplit(rl[i], "\t")) #strsplitでdelimitorとして\tで分割
gs_list[[dl[1]]] <- dl[3:length(rl)] #dl[1]とdl[2]には、motif名、urlなどの情報があるので除いておく
}
#1番のリストから遺伝子名を取り出す。
#!/bin/sh
echo "This program compress bed files to zip files in the folder"
echo "last update 2012.3.11 ........................................."
#Retrive filenames
Files=`ls`
m2=0