<jupyter_start><jupyter_text>Working with the fcs parser**ATTENTION** The parser returns the data exactly as recorded in the file. This means that no transformations or compensation have been applied to this data. It is up to you to transform the data from this point for doing analysis and visualization.<jupyter_code>%pylab inline
import fcsparser

path = fcsparser.test_sample_path # path to a test data file that is included with the package<jupyter_output><empty_output><jupyter_text>Unpack meta only<jupyter_code>meta = fcsparser.parse(path, meta_data_only=True)
print type(meta)
print meta.keys()<jupyter_output><type 'dict'>
[u'SAMPLE ID', u'$P7N', u'$ETIM', u'$P7E', u'$P7G', u'P8DISPLAY', u'SampleID', u'$P7B', u'FSC ASF', u'CYTNUM', u'$ENDDATA', u'P2DISPLAY', u'EXPORT USER NAME', u'$P7V', u'$ENDSTEXT', u'$P7R', u'LASER2NAME', u'CREATOR', u'LASER1DELAY', u'$P3V', u'$P11R', u'P4DISPLAY', u'$P11N', u'P2MS', u'THRESHOLD', u'$P11E', u'$SYS', u'$P11B', u'$P6B', u'$INST', u'$P6G', u'$P6E', u'APPLY COMPENSATION', u'$PAR', u'EXPORT TIME', u'$P6N', u'$P6R', u'$P6V', u'P9MS', u'$ENDANALYSIS', u'LASER4DELAY', u'$CYT', u'$BTIM', u'$P3E', u'$OP', u'$P1N', u'P1DISPLAY', u'$P1B', u'$P1G', u'$P1E', u'P7BS', u'$P1R', u'P3MS', u'P9BS', u'$P1V', u'PLATE NAME', u'$P9B', u'$P9G', u'$P9E', u'SPILL', u'$FIL', u'$P9R', u'$P9V', u'$DATE', u'WELL ID', u'P10BS', u'P6MS', u'LASER1ASF', u'P1BS', u'P2BS', u'LASER2ASF', u'$P8B', u'$P8E', u'P6BS', u'$P8V', u'$P10R', u'$P8N', u'P5BS', u'LASER4NAME', u'LASER4ASF', u'$P10N', u'$P10B', u'$P10E', u'$P10G', u'$P3R', u'P11MS', u'$SRC', u'$P3B', u'P4MS', u'$P3G', u'$BYTEORD', u'$P3[...]<jupyter_text>Unpack meta and reformat<jupyter_code>meta = fcsparser.parse(path, meta_data_only=True, reformat_meta=True)
meta['_channels_']<jupyter_output><empty_output><jupyter_text>Unpack meta and data<jupyter_code>meta, data = fcsparser.parse(path, meta_data_only=False, reformat_meta=True)
print type(meta)
print type(data)
data<jupyter_output><empty_output><jupyter_text>Untransformed dataThe plot below is a plot of the raw data as recorded in the file. Specifically, no compensation or transformation has been applied to this data.To better visualize this data you might want to take a look at either hlog or logicle transformations.<jupyter_code>scatter(data['FITC-A'], data['AmCyan-A'], alpha=0.8, color='gray')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18989473684210526, 'fraction_numerical': 0.03326315789473684, 'mean_word_length': 8.138461538461538, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 21, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '357061', 'license': 'MIT', 'n_tokens_mistral': 1026, 'n_tokens_neox': 992, 'n_words': 237, 'path': 'doc/fcsparser_example.ipynb', 'repo_name': 'cytoflow/fcsparser', 'size': '2375'}