Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
  • Loading branch information
drewjbeh committed Jun 22, 2021
1 parent 2709d14 commit 4dbfb65
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 12 deletions.
13 changes: 7 additions & 6 deletions build/lib/mimseq/deseq.R
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ outdir = args[1]
sampleData = args[2]
control_cond = args[3]
cluster_id = as.numeric(args[4])
p_adj = as.numeric(args[5])
subdir = "DESeq2/"
subdir_isodecoder = "DESeq2/isodecoder"
subdir_anticodon = "DESeq2/anticodon"
Expand Down Expand Up @@ -299,9 +300,9 @@ if (nrow(coldata) == 1) {

# Count plots
# add significance to baseMean matrices for current contrast
baseMeanPerLvl_anticodon$sig = res_anticodon[rownames(baseMeanPerLvl_anticodon),'padj'] < 0.05
baseMeanPerLvl_anticodon$sig = res_anticodon[rownames(baseMeanPerLvl_anticodon),'padj'] <= p_adj
baseMeanPerLvl_anticodon$sig = !is.na(baseMeanPerLvl_anticodon$sig) & baseMeanPerLvl_anticodon$sig # deal with NAs turning them into FALSE
baseMeanPerLvl_isodecoder$sig = res_isodecoder[rownames(baseMeanPerLvl_isodecoder),'padj'] < 0.05
baseMeanPerLvl_isodecoder$sig = res_isodecoder[rownames(baseMeanPerLvl_isodecoder),'padj'] <= p_adj
baseMeanPerLvl_isodecoder$sig = !is.na(baseMeanPerLvl_isodecoder$sig) & baseMeanPerLvl_isodecoder$sig # deal with NAs turning them into FALSE

# add direction of DE to baseMean
Expand Down Expand Up @@ -331,8 +332,8 @@ if (nrow(coldata) == 1) {
scale_x_log10() + scale_y_log10() +
#geom_smooth(method = 'lm', se = TRUE, alpha = 0.5, color = '#3182bd', fill = 'grey') +
geom_abline(intercept = 0, slope = 1, linetype = 'dashed', color = '#3182bd', alpha = 0.8) +
scale_color_manual('Differential expression', labels = c("None", "Down", "Up"), values = c("darkgrey", "#f28f3b", "#4daf4a")) +
scale_shape_manual('Differential expression', labels = c("None", "Down", "Up"), values = c(19, 17, 17)) +
scale_color_manual(paste('Differential expression\n(p-adj <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("darkgrey", "#f28f3b", "#4daf4a")) +
scale_shape_manual(paste('Differential expression\n(p-adj <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c(19, 17, 17)) +
scale_size_manual(values = c(1,2), guide = FALSE) + theme_bw() +
labs(x = paste('log10', combinations[[i]][2], 'counts', sep = ' '), y = paste('log10', combinations[[i]][1], 'counts', sep = ' ')) +
annotate("label", 0, Inf, hjust = 0, vjust = 1, label = paste("italic(r) == ", anticodon_cor), parse = TRUE)
Expand All @@ -342,8 +343,8 @@ if (nrow(coldata) == 1) {
scale_x_log10() + scale_y_log10() +
#geom_smooth(method = 'lm', se = TRUE, alpha = 0.5, color = '#3182bd', fill = 'grey') +
geom_abline(intercept = 0, slope = 1, linetype = 'dashed', color = '#3182bd', alpha = 0.8) +
scale_color_manual('Differential expression', labels = c("None", "Down", "Up"), values = c("darkgrey", "#f28f3b", "#4daf4a")) +
scale_shape_manual('Differential expression', labels = c("None", "Down", "Up"), values = c(19, 17, 17)) +
scale_color_manual(paste('Differential expression\n(p-adj <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c("darkgrey", "#f28f3b", "#4daf4a")) +
scale_shape_manual(paste('Differential expression\n(p-adj <=',p_adj, ')'), labels = c("None", "Down", "Up"), values = c(19, 17, 17)) +
scale_size_manual(values = c(1,2), guide = FALSE) + theme_bw() +
labs(x = paste('log10', combinations[[i]][2], 'counts', sep = ' '), y = paste('log10', combinations[[i]][1], 'counts', sep = ' ')) +
annotate("label", 0, Inf, hjust = 0, vjust = 1, label = paste("italic(r) == ", isodecoder_cor), parse = TRUE)
Expand Down
10 changes: 7 additions & 3 deletions build/lib/mimseq/mimseq.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def restrictedFloat2(x):
raise argparse.ArgumentTypeError('{} not a real number'.format(x))

def mimseq(trnas, trnaout, name, species, out, cluster, cluster_id, cov_diff, posttrans, control_cond, threads, max_multi, snp_tolerance, \
keep_temp, cca, double_cca, min_cov, mismatches, remap, remap_mismatches, misinc_thresh, mito_trnas, pretrnas, local_mod, sample_data):
keep_temp, cca, double_cca, min_cov, mismatches, remap, remap_mismatches, misinc_thresh, mito_trnas, pretrnas, local_mod, p_adj, sample_data):

# Main wrapper
# Integrity check for output folder argument...
Expand Down Expand Up @@ -176,7 +176,7 @@ def mimseq(trnas, trnaout, name, species, out, cluster, cluster_id, cov_diff, po
\n| Differential expression analysis with DESeq2 |\
\n+----------------------------------------------+")

deseq_cmd = ["Rscript", script_path + "/deseq.R", out, sample_data, control_cond, str(cluster_id)]
deseq_cmd = ["Rscript", script_path + "/deseq.R", out, sample_data, control_cond, str(cluster_id), str(p_adj)]
#subprocess.check_call(deseq_cmd)
process = subprocess.Popen(deseq_cmd, stdout = subprocess.PIPE)
while True:
Expand Down Expand Up @@ -239,6 +239,10 @@ def main():
options.add_argument('--local-modomics', required=False, dest = 'local_mod', action='store_true',\
help = "Disable retrieval of Modomics data from online. Instead use older locally stored data. Warning - this leads\
to usage of older Modomics data!")
options.add_argument('--p-adj', required = False, dest = 'p_adj', type = restrictedFloat, default=0.05,\
help = "Adjusted p-value threshold for DESeq2 pairwise condition differential epxression dot plots. \
tRNAs with DESeq2 adjusted p-values equal to or below this value will be displayed as green or orange triangles for up- or down-regulated tRNAs, respectively. \
Default p-adj <= 0.05")

align = parser.add_argument_group("GSNAP alignment options")
align.add_argument('--max-mismatches', metavar = 'allowed mismatches', required = False, dest = 'mismatches', type = float, \
Expand Down Expand Up @@ -358,7 +362,7 @@ def main():
mimseq(args.trnas, args.trnaout, args.name, args.species, args.out, args.cluster, args.cluster_id, args.cov_diff, \
args.posttrans, args.control_cond, args.threads, args.max_multi, args.snp_tolerance, \
args.keep_temp, args.cca, args.double_cca, args.min_cov, args.mismatches, args.remap, args.remap_mismatches, \
args.misinc_thresh, args.mito, args.pretrnas, args.local_mod, args.sampledata)
args.misinc_thresh, args.mito, args.pretrnas, args.local_mod, args.p_adj, args.sampledata)

if __name__ == '__main__':
main()
Expand Down
1 change: 1 addition & 0 deletions build/lib/mimseq/mmQuant.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ def unknownMods(inputs, knownTable, cluster_dict, modTable, misinc_thresh, cov_t
isodecoder, pos = line.split("\t")[0:2]
predRound1[isodecoder].append(int(pos))
knownTable = {cluster:[pos for pos in knownTable[cluster] if pos not in predRound1[cluster]] for cluster, pos in knownTable.items()} # subtraction
knownTable = defaultdict(list, knownTable)
except:
next

Expand Down
2 changes: 1 addition & 1 deletion build/lib/mimseq/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.4.1"
__version__ = "0.3.4.2"
Binary file removed dist/mimseq-0.3.4.1.tar.gz
Binary file not shown.
Binary file not shown.
Binary file added dist/mimseq-0.3.4.2.tar.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion mimseq.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 1.1
Name: mimseq
Version: 0.3.4.1
Version: 0.3.4.2
Summary: Custom high-throughput tRNA sequencing alignment and quantification pipeline based on modification induced misincorporation cDNA synthesis.
Home-page: https://github.com/nedialkova-lab/mim-tRNAseq
Author: Drew Behrens
Expand Down
2 changes: 1 addition & 1 deletion mimseq/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.4.1"
__version__ = "0.3.4.2"

0 comments on commit 4dbfb65

Please sign in to comment.