Skip to content

Commit

Permalink
Feature/v1.5.8 (#97)
Browse files Browse the repository at this point in the history
* Fixed bug in CSV export; quality_mask probes were NaN instead of 1.0

* pyparsing error on circleci
  • Loading branch information
Marc Maxmeister authored Nov 4, 2021
1 parent 53865b3 commit f59c00f
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 4 deletions.
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ pytest-mock = "*"
coverage = "*"

[packages]
pyparsing = "<3"
numpy = "*" # "==1.16.3"
pandas = ">=1.3.0"
statsmodels = "*" # "==0.9.0"
Expand Down
7 changes: 7 additions & 0 deletions docs/release-history.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Release History

## v1.5.8
- Fixed bug in CSV export; quality_mask (probes to be excluded from pickles) were NaN instead of 1.0

## v1.5.7
- Merely a maintenance release to deal with some dependency conflicts in the python science stack.
Pandas version 1.3+ now supported.

## v1.5.6
- completely rewritten and updated documentation, including a more extensive tutorial
- updated all manifests to include probe-to-locus mapping for two genome builds
Expand Down
2 changes: 1 addition & 1 deletion methylprep/processing/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -855,7 +855,7 @@ def export(self, output_path):
'noob_unmeth': self.__quality_mask_excluded_probes['noob_unmeth']
})
if 'quality_mask' in this.columns:
this['quality_mask'] = this['quality_mask'].fillna(0)
this['quality_mask'] = this['quality_mask'].fillna(1)
# noob columns contain NANs now because of sesame (v1.4.0 to v1.4.5); v1.4.6+ CSVs contain all data, but pickles are filtered.
#try:
# self.__data_frame['noob_meth'] = self.__data_frame['noob_meth'].astype(int, copy=False)
Expand Down
2 changes: 1 addition & 1 deletion methylprep/processing/preprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ def _apply_sesame_quality_mask(data_container):
cgs = pd.DataFrame( np.zeros((len(data_container.man.index), 1)), index=data_container.man.index, columns=['quality_mask'])
snps = pd.DataFrame( np.zeros((len(data_container.snp_man.index), 1)), index=data_container.snp_man.index, columns=['quality_mask'])
df = pd.concat([cgs, snps])
df.loc[ df.index.isin(probes), 'quality_mask'] = np.nan #converted to 0 during export
df.loc[ df.index.isin(probes), 'quality_mask'] = np.nan #converted to 1 during export
#LOGGER.info(f"DEBUG quality_mask: {df.shape}, {df['quality_mask'].isna().sum()} nan from {probes.shape} probes")
return df

Expand Down
2 changes: 1 addition & 1 deletion methylprep/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# 1) we don't load dependencies by storing it in __init__.py
# 2) we can import it in setup.py for the same reason
# 3) we can import it into your module module
__version__ = '1.5.7'
__version__ = '1.5.8'
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
numpy
pyparsing<3
snumpy
pandas>=1.3.0
scipy
statsmodels
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
include_package_data=True,
package_data={"":["*.txt.gz"]},
install_requires=[
'pyparsing > 3.0',
'numpy',
'pandas >=1.3.0',
'scipy',
Expand Down

0 comments on commit f59c00f

Please sign in to comment.