比对

作者: 宗肃書 | 来源:发表于2020-10-15 15:37 被阅读0次

    虽然已经学了好久,但是之前一直不会用脚本,只会用循环命令。还好今天用两个小时学会了脚本,现在分享出来

    在cleandata文件夹下

    ls `pwd`/*_1* >new_fastq_1

    ls `pwd`/*_2* >new_fastq_2

    paste new_fastq_1 new_fastq_2 >conf_fastq

    #将脚本写入script目录中,

    cd script

    #新建一个名字为filter.sh脚本,并添加内容

    vim bidui.sh

    #脚本内容

    cat ~/Lishaomei/goosecleandata/conf_fastq | while read i

    do

      fqs=($i)

      fq1=${fqs[0]}

      fq2=${fqs[1]}

      echo $i

      b=$(echo $fq1 | cut -d "_" -f2)     

      c=$(echo $fq2 | cut -d "_" -f2)

            if [ $b = $c ];then

    nohup hisat2 -p 6 -x /public/jychu/Lishaomei/reference/index/index -1 $fq1 -2 $fq2  -S /public/jychu/Lishaomei/bam/$b.sam

    fi

    done

    chmod a+x bidui.sh

    ./bidui.sh

    相关文章

      网友评论

          本文标题:比对

          本文链接:https://www.haomeiwen.com/subject/xptopktx.html