Warning

This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.datatypes.metacyto

"""
MetaCyto analysis datatypes.
"""

import logging

from galaxy.datatypes.sniff import FilePrefix
from galaxy.datatypes.tabular import Tabular

log = logging.getLogger(__name__)


[docs]class mStats(Tabular): """Class describing the table of cluster statistics output from MetaCyto""" file_ext = "metacyto_stats.txt"
[docs] def sniff_prefix(self, file_prefix: FilePrefix): """Quick test on file headings""" if file_prefix.startswith("fcs_files\tcluster_id\tlabel\tfcs_names"): header_line = file_prefix.string_io().readline() if header_line.strip().split("\t")[-1] == "fraction": return True elif file_prefix.truncated and file_prefix.string_io().read() == header_line: return True return False
[docs]class mSummary(Tabular): """Class describing the summary table output by MetaCyto after FCS preprocessing""" file_ext = "metacyto_summary.txt"
[docs] def sniff_prefix(self, file_prefix: FilePrefix): return file_prefix.startswith("study_id\tantibodies\tfilenames")