Comments (4)
thanks for reporting this looks like something is passing an extra 'd' argument down the road
in the meantime you can define your own custom transformations if you need a workaround
http://eyurtsev.github.io/FlowCytometryTools/gallery.html#custom-transformations
from flowcytometrytools.
No problem on the report, nice looking library. I will try the custom transforms out.
from flowcytometrytools.
I believe I figured out why this issue is happening. In your FCMeasurement.tranform method you have the following code
if isinstance(transform, Transformation): transformer = transform else: if auto_range: # determine transformation range if 'd' in kwargs: warnings.warn( 'Encountered both auto_range=True and user-specified range value in ' 'parameter d.\n Range value specified in parameter d is used.') else: print "in else" channel_meta = self.channels # the -1 below because the channel numbers begin from 1 instead of 0 # (this is fragile code) ranges = [float(r['$PnR']) for i, r in channel_meta.iterrows() if self.channel_names[i - 1] in channels] if not np.allclose(ranges, ranges[0]): raise Exception("""Not all specified channels have the same data range, therefore they cannot be transformed together.\n HINT: Try transforming one channel at a time. You'll need to provide the name of the channel in the transform.""") kwargs['d'] = np.log10(ranges[0])
Specifically the "isinstance" check is not working and therefore everything (linear, hlog, tlog, etc) is falling through to the final line kwargs['d'] = np.log10(ranges[0])
In this case d will always be
'd': 5.4185399219516617
and therefore for hlog, tlog this is not an issue (except if you want to use another d), and linear and glog it is an issue since neither take d as an argument. I do not use isinstance that often unless referring to built in types so I am not familiar with how to properly use it in a custom class. Probably not the most elegant solution but perhaps a simple function in the transforms.py code which allows you to check from a list?
Let me know if you need any more info
from flowcytometrytools.
Thanks for looking into this... This commit should fix the issue:
from flowcytometrytools.
Related Issues (20)
- Unable to load fcs files HOT 7
- Any plans to add support for writing data in FCS format? HOT 1
- hlog transformation and negative values HOT 1
- IntervalGate bug(?) HOT 6
- 'pip install goreutilities' does not install the correct (latest) version and breaks Python 3 support HOT 5
- Load a csv file into FlowCytometryTools HOT 3
- Unable to load 96 well plate data
- Is there a way to conda install it? HOT 1
- "500: Internal Server Error" when using gui with backend='webagg' HOT 1
- Use of deprecated function from matplotlib in docs HOT 1
- Bi-Exponential scale/trasformation HOT 1
- Subsampling function not working HOT 1
- FlowCytometryTools won't import HOT 3
- Exporting FCS files of singlet "gate" with compensation values
- bases.py installed by FlowCytometryTools version 0.51 is identical to version 0.50
- MultipleMapping Class error HOT 1
- documentation figures are 404'd HOT 2
- logical (bi-exponetial) scale support? HOT 1
- Issue with accessing data in .fcs files HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flowcytometrytools.