美文网首页
picard bam2fq

picard bam2fq

作者: 为了梦走一遭 | 来源:发表于2021-04-08 07:17 被阅读0次

! /bin/bash

$ -l mem=30G,time=50::

$ -j y

$ -N bam2fq

$ -cwd

source ~/.bashrc

in_dir=/ifs/data/dipg_cbttc_bam
out_dir=/ifs/data/dipg_cbttc_fastq

mkdir $out_dir

for fullpath in "$in_dir"/*

do
filename="{fullpath##*/}" # Strip longest match of */ from start dir="{fullpath:0:{#fullpath} -{#filename}}" # Substring from 0 thru pos of filename
base="{filename%.[^.]*}" # Strip shortest match of . plus at least one non-dot char from end ext="{filename:${#base} + 1}"

echo filename echodir
echo base echoext

java -Xmx2g -jar /ifs/scratch/picard.jar SamToFastq I=fullpath F={out_dir}/{base}_R1.fastq F2={out_dir}/${base}_R2.fastq

samtools bam2fq fullpath >{out_dir}/${base}.fastq

done

相关文章

网友评论

      本文标题:picard bam2fq

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