Skip to content

Commit

Permalink
standardise plot size
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-mRNA committed Apr 26, 2024
1 parent 0ba0f31 commit d44cc12
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions manuscript_demo/process_data_V2_r10.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ export wd="/g/data/lf10/as7425/R2DTool_demo"; mkdir -p ${wd} 2>/dev/null
export reads="/g/data/lf10/as7425/2023_mrna-biogenesis-maps/analysis/2024-03-28_ASR012_HeLa-total-RNA004-rep1/ASR012_HeLa-total-RNA004-rep1_dorado_polyA_m6A_all_reads.fastq"
export genome="/g/data/lf10/as7425/genomes/human_genome/ensembl_release_110/Homo_sapiens.GRCh38.cdna.all.fa"

# map to genome
minimap2 -ax map-ont -y -k 14 -N 10 ${genome} ${reads} -t 104 | samtools view -bh > ${wd}/aligned_reads.bam
# map to transcriptome
minimap2 -ax map-ont -y -k 14 -N 20 ${genome} ${reads} -t 104 | samtools view -bh > ${wd}/aligned_reads.bam

# filter for primary alignments with nonzero mapq
samtools view -b -F 2308 -@ 104 -q 1 ${wd}/aligned_reads.bam | samtools sort > ${wd}/primary.bam
Expand All @@ -22,7 +22,6 @@ export PATH="$PATH:/g/data/lf10/as7425/apps/modkit/target/release"
modkit pileup -t 104 ${wd}/primary.bam "${wd}/pileup.bed" --log-filepath "${wd}/pileup.bed.log"

# prepare for R2Dtool
# Prepare for R2Dtool
printf "transcript\tstart\tend\tmod\tcov\tstrand\tstart\tend\tcolor\tX1\tX2\tcov\tfrac_mod\tn_mod\tn_canonical\tn_other_mod\tn_delete\tn_fail\tn_diff\tn_no_call\n" > ${wd}/R2D_input.bed
awk 'BEGIN {FS=OFS="\t"} {gsub(",", OFS, $0); $9="."; print}' "${wd}/pileup.bed" | tr " " "\t" | awk '($12 > 9)' >> ${wd}/R2D_input.bed

Expand Down
2 changes: 1 addition & 1 deletion scripts/R2_plotMetaCodon.R
Original file line number Diff line number Diff line change
Expand Up @@ -166,4 +166,4 @@ if (!is.null(options$output_path)) {

# Plot and save
p <- plot_ratio(out_ratio)
ggsave(output_file, p, scale = 4, width = 850, height = 750, units = "px")
ggsave(output_file, p, scale = 4, width = 600, height = 400, units = "px")
2 changes: 1 addition & 1 deletion scripts/R2_plotMetaJunction.R
Original file line number Diff line number Diff line change
Expand Up @@ -125,5 +125,5 @@ if (!is.null(output_path)) {
p <- plot_sj_data(sj_data, ci_method)

# save plot
ggsave(output_file, p, scale = 4, width = 850, height = 750, units = c("px"))
ggsave(output_file, p, scale = 4, width = 600, height = 400, units = c("px"))

2 changes: 1 addition & 1 deletion scripts/R2_plotMetaTranscript.R
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ if (!is.null(output_path)) {
p <- plot_ratio(out_ratio, ci_method, add_labels)

# save the plot
ggsave(output_file, p, scale = 4, width = 850, height = 750, units = c("px"))
ggsave(output_file, p, scale = 4, width = 600, height = 400, units = c("px"))

0 comments on commit d44cc12

Please sign in to comment.