Nilesh Patra pushed to branch upstream at Debian Med / mirtop
Commits: a3cd2ea9 by Nilesh Patra at 2022-05-29T11:23:18+05:30 New upstream version 0.4.25 - - - - - 3 changed files: - HISTORY.md - mirtop/gff/stats.py - setup.py Changes: ===================================== HISTORY.md ===================================== @@ -1,3 +1,7 @@ +0.4.25 + +* [fix outliers samples](https://github.com/nf-core/smrnaseq/issues/137). When there is no identification of reference sequences or isomirs, the multiqc module will fails because it won't find the expected keys. Adding 0 when is the case. + 0.4.24 * [fix bad](https://github.com/miRTop/mirtop/issues/64) annotation when 5 or more T/A at the end of the sequence by @DrHogart ===================================== mirtop/gff/stats.py ===================================== @@ -103,6 +103,20 @@ def _classify(srna_type, attr, samples): return lines +def _add_missing(df): + # ref_miRNA_mean + category = "ref_miRNA_mean" + if sum(df['category']==category) == 0: + df2 = {'category': category, 'sample': df['sample'].iat[0], 'counts': 0} + df = df.append(df2, ignore_index = True) + + category = "isomiR_sum" + if sum(df['category']==category) == 0: + df2 = {'category': category, 'sample': df['sample'].iat[0], 'counts': 0} + df = df.append(df2, ignore_index = True) + + return df + def _summary(lines): """ Summarize long table according to thresholds @@ -113,10 +127,13 @@ def _summary(lines): df.counts = df.counts.astype(int) df_sum = df.groupby(['category', 'sample'], as_index=False).sum() df_sum['category'] = ["%s_sum" % r for r in df_sum['category']] + df_sum = _add_missing(df_sum) df_count = df.groupby(['category', 'sample'], as_index=False).count() df_count['category'] = ["%s_count" % r for r in df_count['category']] + df_count = _add_missing(df_count) df_mean = df.groupby(['category', 'sample'], as_index=False).mean() df_mean['category'] = ["%s_mean" % r for r in df_mean['category']] + df_mean = _add_missing(df_mean) df = pd.concat([df_sum, df_count, df_mean]) return df ===================================== setup.py ===================================== @@ -3,7 +3,7 @@ import os from setuptools import setup, find_packages -version = '0.4.24' +version = '0.4.25' url = 'http://github.com/mirtop/mirtop' View it on GitLab: https://salsa.debian.org/med-team/mirtop/-/commit/a3cd2ea9096f04e221cabff43b591229cd959293 -- View it on GitLab: https://salsa.debian.org/med-team/mirtop/-/commit/a3cd2ea9096f04e221cabff43b591229cd959293 You're receiving this email because of your account on salsa.debian.org.
_______________________________________________ debian-med-commit mailing list [email protected] https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/debian-med-commit
