shell脚本使用小技巧-持续更新

1.假如下面的shell脚本"2024_extractrG4_calculating_score_filternonoverlapG4.sh"

#!/bin/bash
python lin_change_gff3original.py -i iwgsc_refseqv2.1_annotation_200916_HC_LC.gff3 -o iwgsc_refseqv2.1_annotation_200916_HC_LC.gff4


# Define base filenames
fasta_base="iwgsc_refseqv2.1_annotation_200916_HC_LC_mrna.fasta"
gff_file="iwgsc_refseqv2.1_annotation_200916_HC_LC.gff4"

# Array of types
types=("G4" "C4" "A4" "T4")

# Loop through each type and process files accordingly
for type in "${types[@]}"
do
    # Python script to extract r[type] structures
    python "lin_20240425_extract_r${type}.py" -f1 "$fasta_base" -f2 "lijinonextended_mrna_allr${type}output.fasta"

    # R script to calculate r[type] score
    Rscript "lin_20240321_calculating_r${type}score.R" -i "lijinonextended_mrna_allr${type}output.fasta" -o "lijinonextended_mrna_allr${type}output1.fasta"

    # Python script to annotate with gff4
    python "lin_annotating_r${type}_with_gff4.py" -g "$gff_file" -f "lijinonextended_mrna_allr${type}output1.fasta" -o "lijinonextended_mrna_allr${type}output2.fasta"
    
    less "lijinonextended_mrna_allr${type}output2.fasta" | grep -E 'Id|five' > "five_r${type}_total.txt"
    less "lijinonextended_mrna_allr${type}output2.fasta" | grep -E 'Id|CDS' > "cds_r${type}_total.txt"
    less "lijinonextended_mrna_allr${type}output2.fasta" | grep -E 'Id|three' > "three_r${type}_total.txt"
    cp "lijinonextended_mrna_allr${type}output2.fasta" "mrna_r${type}_total.txt"
    
    python lin_filter_non-overlap_rG4.py -f1 "five_r${type}_total.txt" -f2 "five_r${type}_total1.txt"
    python lin_filter_non-overlap_rG4.py -f1 "cds_r${type}_total.txt" -f2 "cds_r${type}_total1.txt"
    python lin_filter_non-overlap_rG4.py -f1 "three_r${type}_total.txt" -f2 "three_r${type}_total1.txt"
    python lin_filter_non-overlap_rG4.py -f1 "mrna_r${type}_total.txt" -f2 "mrna_r${type}_total1.txt"
done

如果,我后台运行这个脚本之后,想取消总的进程,可以这样操作:

ps aux | grep 2024_extractrG4_calculating_score_filternonoverlapG4.sh 
kill -SIGINT 2852911

相关推荐

  1. shell脚本使用技巧-持续更新

    2024-04-30 18:28:02       36 阅读
  2. shell脚本调试技巧

    2024-04-30 18:28:02       56 阅读
  3. 自动化更新包文件--shell脚本

    2024-04-30 18:28:02       41 阅读
  4. VScode使用持续更新中。。。

    2024-04-30 18:28:02       33 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-04-30 18:28:02       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-04-30 18:28:02       100 阅读
  3. 在Django里面运行非项目文件

    2024-04-30 18:28:02       82 阅读
  4. Python语言-面向对象

    2024-04-30 18:28:02       91 阅读

热门阅读

  1. 多态案例(制作饮品)

    2024-04-30 18:28:02       35 阅读
  2. 动态规划与搜索算法

    2024-04-30 18:28:02       32 阅读
  3. Springboot项目中对Redis的使用

    2024-04-30 18:28:02       29 阅读
  4. JVM的类加载过程是怎样的

    2024-04-30 18:28:02       26 阅读
  5. web server apache tomcat11-25-Advanced IO and Tomcat

    2024-04-30 18:28:02       28 阅读
  6. js常用方法(未完待续...)

    2024-04-30 18:28:02       31 阅读
  7. 标准更新丨美国发布玩具安全标准ASTM F963-23

    2024-04-30 18:28:02       27 阅读
  8. MATLAB初学者入门(25)—— LQR控制器优化设计

    2024-04-30 18:28:02       34 阅读