mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-21 13:50:20 +08:00
Fix problem where multiple scaffolds are displayed per species when working
with MAFs.
This commit is contained in:
@@ -56,12 +56,19 @@ class Maf( Alignment ):
|
||||
try:
|
||||
for i, m in enumerate( bx.align.maf.Reader( open(dataset.file_name) ) ):
|
||||
for c in m.components:
|
||||
spec,chrom = bx.align.maf.src_split( c.src )
|
||||
if not spec or not chrom: spec = chrom = c.src
|
||||
if spec not in species: species.append(spec)
|
||||
#only check first 100,000 blocks for species
|
||||
## spec,chrom = bx.align.maf.src_split( c.src )
|
||||
## if not spec or not chrom: spec = chrom = c.src
|
||||
# "src_split" finds the rightmost dot, which is probably
|
||||
# wrong in general, and certainly here.
|
||||
spec = c.src
|
||||
if "." in spec:
|
||||
spec = spec.split( "." )[0]
|
||||
if spec not in species:
|
||||
species.append(spec)
|
||||
# only check first 100,000 blocks for species
|
||||
if i > 100000: break
|
||||
except: pass
|
||||
except:
|
||||
pass
|
||||
dataset.metadata.species = species
|
||||
|
||||
def missing_meta( self, dataset ):
|
||||
|
||||
Reference in New Issue
Block a user