mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
removed sniffers, removed pinned, removed classes
This commit is contained in:
@@ -524,8 +524,7 @@
|
||||
<datatype extension="xmfa" type="galaxy.datatypes.msa:MauveXmfa" display_in_upload="true" />
|
||||
<datatype extension="cel" type="galaxy.datatypes.binary:Cel" display_in_upload="true" />
|
||||
<datatype extension="rdata" type="galaxy.datatypes.binary:RData" display_in_upload="true" description="Stored data from an R session"/>
|
||||
<datatype extension="rds" type="galaxy.datatypes.binary:RDS" display_in_upload="true" description="RDS serialised RData object"/>
|
||||
<datatype extension="sce" type="galaxy.datatypes.binary:SingleCellExperiment" display_in_upload="true" description="Stored RDS from a SingleCellObject"/>
|
||||
<datatype extension="sce" type="galaxy.datatypes.binary:RData" description="Stored RDS from a SingleCellObject" subclass="true" />
|
||||
<datatype extension="oxlicg" type="galaxy.datatypes.binary:OxliCountGraph" mimetype="application/octet-stream" display_in_upload="true"/>
|
||||
<datatype extension="oxling" type="galaxy.datatypes.binary:OxliNodeGraph" mimetype="application/octet-stream" display_in_upload="true"/>
|
||||
<datatype extension="oxlits" type="galaxy.datatypes.binary:OxliTagSet" mimetype="application/octet-stream" display_in_upload="true"/>
|
||||
@@ -825,8 +824,6 @@
|
||||
<sniffer type="galaxy.datatypes.annotation:SnapHmm" />
|
||||
<sniffer type="galaxy.datatypes.binary:Cel" />
|
||||
<sniffer type="galaxy.datatypes.binary:RData" />
|
||||
<sniffer type="galaxy.datatypes.binary:RDS" />
|
||||
<sniffer type="galaxy.datatypes.binary:SingleCellExperiment" />
|
||||
<sniffer type="galaxy.datatypes.images:Jpg"/>
|
||||
<sniffer type="galaxy.datatypes.images:Png"/>
|
||||
<sniffer type="galaxy.datatypes.images:Tiff"/>
|
||||
|
||||
@@ -19,8 +19,6 @@ import h5py
|
||||
import pysam
|
||||
import pysam.bcftools
|
||||
from bx.seq.twobit import TWOBIT_MAGIC_NUMBER, TWOBIT_MAGIC_NUMBER_SWAP, TWOBIT_MAGIC_SIZE
|
||||
from rpy2.rinterface import RRuntimeError
|
||||
from rpy2.robjects.packages import importr
|
||||
|
||||
from galaxy import util
|
||||
from galaxy.datatypes import metadata
|
||||
@@ -1298,54 +1296,6 @@ class RData(Binary):
|
||||
return False
|
||||
|
||||
|
||||
class RDS(Binary):
|
||||
"""RDS object, compressed R object
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname( 'test.sce' )
|
||||
>>> RDS().sniff( fname )
|
||||
True
|
||||
>>> fname = get_test_fname( 'test.rds' )
|
||||
>>> RDS().sniff( fname )
|
||||
True
|
||||
>>> fname = get_test_fname( 'oxli_countgraph.oxlicg' )
|
||||
>>> RDS().sniff( fname )
|
||||
False
|
||||
>>> fname = get_test_fname( 'sequence.csfasta' )
|
||||
>>> RDS().sniff( fname )
|
||||
False
|
||||
"""
|
||||
file_ext = "rds"
|
||||
class_name = None
|
||||
|
||||
def sniff(self, filename):
|
||||
base = importr('base')
|
||||
try:
|
||||
fdat = base.readRDS(filename)
|
||||
except RRuntimeError:
|
||||
return False
|
||||
|
||||
if self.class_name is None:
|
||||
return True
|
||||
|
||||
return tuple(fdat.rclass)[0] == self.class_name
|
||||
|
||||
|
||||
class SingleCellExperiment(RDS):
|
||||
"""Specific class file for RDS, R data
|
||||
|
||||
>>> from galaxy.datatypes.sniff import get_test_fname
|
||||
>>> fname = get_test_fname( 'test.sce' )
|
||||
>>> SingleCellExperiment().sniff( fname )
|
||||
True
|
||||
>>> fname = get_test_fname( 'test.rds' )
|
||||
>>> SingleCellExperiment().sniff( fname )
|
||||
False
|
||||
"""
|
||||
file_ext = "sce"
|
||||
class_name = "SingleCellExperiment"
|
||||
|
||||
|
||||
class OxliBinary(Binary):
|
||||
|
||||
@staticmethod
|
||||
|
||||
@@ -34,4 +34,3 @@ nose==1.3.7
|
||||
requests==2.18.4
|
||||
idna==2.6
|
||||
nodeenv==1.2.0
|
||||
rpy2==2.8.6
|
||||
|
||||
Reference in New Issue
Block a user