s1_noUMI_clean_align_20220705.pbs 2.0 KB

12345678910111213141516171819202122232425262728293031
  1. #!/bin/sh
  2. #PBS -N align_svcalling_noUMI
  3. #PBS -j oe
  4. #PBS -l ncpus=20
  5. #PBS -l nodes=1
  6. #PBS -l mem=20G
  7. #inputpath=$1
  8. #sample=$2
  9. source /home/liuxiangqiong/miniconda3/bin/activate base
  10. hg19=/cgdata/Database/GATK/b37/human_g1k_v37_decoy.fasta
  11. target=/cgdata/liuxiangqiong/work62pancancer/Client/v0/script/refdata/NanOnco_Plus_Panel_v2.0_Covered_b37_cg.parY2X.sort.bed
  12. #################################################################################1.trim#########################################################
  13. echo "#--------------------------------------STEP1.clean the raw data--------------------------------------#"
  14. starttime="`date '+%Y%m%d%H%M%S'`"
  15. fastp -i ${inputpath}/${sample}_R1.fastq.gz -I ${inputpath}/${sample}_R2.fastq.gz -o ${inputpath}/${sample}_clean_R1.fq.gz -O ${inputpath}/${sample}_clean_R2.fq.gz -c -l 50 -q 20 --umi --umi_loc read1 --umi_len 8 -j ${inputpath}/${sample}.fastp.json -h ${inputpath}/${sample}.fastp.html
  16. echo "#--------------------------------------STEP1.clean the raw data finished!---------------#"
  17. #################################################################################2.mapping#########################################################
  18. #2.1.speedseq align
  19. echo "#--------------------------------------STEP2.align to refdata--------------------------------------#"
  20. speedseq align -t 40 -o ${bam_dir}/${sample}_clean -R "@RG\tID:${sample}\tSM:${sample}\tLB:${sample}" ${hg19} ${inputpath}/${sample}_clean_R1.fq.gz ${inputpath}/${sample}_clean_R2.fq.gz
  21. echo "#--------------------------------------STEP2.align to refdata finished!--------------------------------------#"
  22. rm -rf ${bam_dir}/${sample}_clean.splitters.bam
  23. rm -rf ${bam_dir}/${sample}_clean.splitters.bam.bai
  24. rm -rf ${bam_dir}/${sample}_clean.discordants.bam
  25. rm -rf ${bam_dir}/${sample}_clean.discordants.bam.bai
  26. endtime="`date '+%Y%m%d%H%M%S'`"
  27. echo "step1 run " $[$endtime-$starttime]"s">${inputpath}/${sample}_mapping.log
  28. echo "${sample} mapping finish!" >>${inputpath}/${sample}_mapping.log