Bpipe搭建pipeline的大坑经历

2022-03-11  本文已影响0人  可能性之兽

之前还试着玩过bpipe,虽然语法自称和shell很像,但是越像越是个大坑,实际上用这个比想象中更麻烦,不是折腾怪不建议折腾这个

Install Instructions - Bpipe

conda install -y bpipe

恶趣味范例(runone.groovy)


youborn = {
  exec "echo 'Hello,crazy world!'"

}

yougrow= {
  exec "echo 'Fuck the world'"
}


youmarry= {
    exec """
        echo "happy,my girl" 
    """
}

youdead={
  exec "echo 'you are back to the hell'"
}

Bpipe.run{youborn+yougrow+youmarry+youdead}

bpipe run runone.groovy

上面那个很容易运行起来,但是一旦实践使用脚本,那么就bug一堆了,比如下面这个

test={
exec """
ls *_1.fastq.gz > 1
ls *_2.fastq.gz > 2
ls *_2.fastq.gz |cut -d"/" -f 8|cut -d"_" -f 1  > 0 ## get sample name
paste 0 1 2  > A1.FQ.config ##  sample name, 1, 2
cat A1.FQ.config  |while read id;
do 
arr=(\$id)
fq2=\${arr[2]}
fq1=\${arr[1]}
sample=\${arr[0]}
echo $sample
trim_galore -q 25  --phred33 --length 36 -e 0.1 --stringency 3 --paired  \$fq1 \$fq2 -o A2.CleanData
done
"""
Bpipe.run{test}
上一篇 下一篇

猜你喜欢

热点阅读