Commit 82ef03da authored by nfontrod's avatar nfontrod
Browse files

src/commands.sh: removing genes with readthrough/no readthrough with a basemean <= 5

parent c991d467
......@@ -574,21 +574,25 @@ mv results/figures/metagene_all_ddx_down_100bin_10000_nt-around-25-bin.pdf resul
python3 -m src.bed_handler.filter_bed -b data/bed/gene.bed -f data/readthrough_gene.txt -c score -o readthrough_gene.bed
python3 -m src.bed_handler.filter_bed -b data/bed/gene.bed -f data/readthrough_gene.txt -c score -o no_readthrough_gene.bed -k 'n'
# Filtering only expressed genes with basemean > 5.
python3 -m src.bed_handler.filter_bed -b results/bed_file/readthrough_gene.bed -f data/5y_expressed_genes_basemean\>5.txt -c id -o readthrough_expressed_gene.bed
python3 -m src.bed_handler.filter_bed -b results/bed_file/no_readthrough_gene.bed -f data/5y_expressed_genes_basemean\>5.txt -c id -o no_readthrough_expressed_gene.bed
# Create bed file corresponding to the 10kb downstream regions of the previous beds
python3 -m src.bed_handler.bed_resize \
-b results/bed_file/no_readthrough_gene.bed \
-b results/bed_file/no_readthrough_expressed_gene.bed \
-s 10000 \
-r "end" \
-t "outer" \
-o no_readthrough_gene_10kb.bed
-o no_readthrough_expressed_gene_10kb.bed
python3 -m src.bed_handler.bed_resize \
-b results/bed_file/readthrough_gene.bed \
-b results/bed_file/readthrough_expressed_gene.bed \
-s 10000 \
-r "end" \
-t "outer" \
-o readthrough_gene_10kb.bed
-o readthrough_expressed_gene_10kb.bed
exps=(all_replicates siCTRL siDDX)
......@@ -598,7 +602,7 @@ for exp in ${exps[*]}; do
python3 -m src.visu \
--design data/design_exp_${exp}.txt \
--bw_folder data/bigwig/ \
--region_bed results/bed_file/readthrough_gene.bed results/bed_file/no_readthrough_gene.bed \
--region_bed results/bed_file/readthrough_expressed_gene.bed results/bed_file/no_readthrough_expressed_gene.bed \
--region_name readthrough no_readthrough \
--output results/figures/ \
--border_name TSS TTS \
......@@ -621,7 +625,7 @@ for exp in ${exps[*]}; do
python3 -m src.visu \
--design data/design_exp_${exp}.txt \
--bw_folder data/bigwig/ \
--region_bed results/bed_file/readthrough_gene_10kb.bed results/bed_file/no_readthrough_gene_10kb.bed \
--region_bed results/bed_file/readthrough_expressed_gene_10kb.bed results/bed_file/no_readthrough_expressed_gene_10kb.bed \
--region_name readthrough no_readthrough \
--output results/figures/ \
--border_name TTS '' \
......@@ -629,9 +633,9 @@ for exp in ${exps[*]}; do
--show_replicate n \
--figure_type metagene \
--nb_bin 25 \
--norm "results/figures/coef_table/tmp_cov_table_design_exp_${exp}_readthrough_gene-no_readthrough_gene_100bin_10000_nt-around-25-bin_bin${bins[$i]}_norm.txt"
--norm "results/figures/coef_table/tmp_cov_table_design_exp_${exp}_readthrough_expressed_gene-no_readthrough_expressed_gene_100bin_10000_nt-around-25-bin_bin${bins[$i]}_norm.txt"
mv results/figures/metagene_readthrough-no_readthrough_25bin_0_nt-around-0-bin_file_norm.pdf results/figures/${exp}_TTS10kb_metagene_readthrough-no_readthrough_25bin_0_nt-around-0-${loc[$i]}_norm.pdf
mv results/figures/metagene_readthrough-no_readthrough_25bin_0_nt-around-0-bin_file_norm.pdf results/figures/${exp}_TTS10kb_readthrough-no_readthrough_${loc[$i]}_norm.pdf
done
done
......@@ -643,7 +647,7 @@ for bed in ${beds[*]}; do
python3 -m src.visu \
--design data/design_exp_all_replicates.txt \
--bw_folder data/bigwig/ \
--region_bed results/bed_file/${bed}_gene.bed \
--region_bed results/bed_file/${bed}_expressed_gene.bed \
--region_name ${bed} \
--output results/figures/ \
--border_name TSS TTS \
......@@ -653,7 +657,7 @@ for bed in ${beds[*]}; do
--nb_bin 100 \
--norm ${bin}
mv results/figures/metagene_${bed}_100bin_10000_nt-around-25-bin_b${bin}_norm.pdf results/figures/all_replicates_metagene_${bed}_25bin_10000_nt-around-25-bin_b${bin}_norm.pdf
mv results/figures/metagene_${bed}_100bin_10000_nt-around-25-bin_b${bin}_norm.pdf results/figures/all_replicates_${bed}_b${bin}_norm.pdf
done
done
......@@ -666,7 +670,7 @@ for bed in ${beds[*]}; do
python3 -m src.visu \
--design data/design_exp_all_replicates.txt \
--bw_folder data/bigwig/ \
--region_bed results/bed_file/${bed}_gene_10kb.bed \
--region_bed results/bed_file/${bed}_expressed_gene_10kb.bed \
--region_name ${bed} \
--output results/figures/ \
--border_name TTS '' \
......@@ -674,9 +678,9 @@ for bed in ${beds[*]}; do
--show_replicate n \
--figure_type metagene \
--nb_bin 25 \
--norm "results/figures/coef_table/tmp_cov_table_design_exp_all_replicates_${bed}_gene_100bin_10000_nt-around-25-bin_bin${bins[$i]}_norm.txt"
--norm "results/figures/coef_table/tmp_cov_table_design_exp_all_replicates_${bed}_expressed_gene_100bin_10000_nt-around-25-bin_bin${bins[$i]}_norm.txt"
mv results/figures/metagene_${bed}_25bin_0_nt-around-0-bin_file_norm.pdf results/figures/metagene_TTS210kb_${bed}_25bin_0_nt-around-0-${loc[$i]}-bin_norm.pdf
mv results/figures/metagene_${bed}_25bin_0_nt-around-0-bin_file_norm.pdf results/figures/all_replicates_TTS10kb_${bed}_${loc[$i]}-bin_norm.pdf
done
done
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment