Skip to content

Get the sequence from a SBOL.xml #52

@linediconsine

Description

@linediconsine

Hi, All

In general, the first element doc._sequences with encoding DNA (/iubmb/misc/naseq.html) is usually the complete sequence of the SBOL circuit.

Right now, I am using :

Note: I still have to test the encoding

 const extractSequence =  (doc) => {
       if(doc._componentDefinitions.length > 0 && doc._componentDefinitions["0"]._sequences.length > 0){
                return doc._componentDefinitions[0]._sequences[0]._elements
        }else if (doc._sequences.length > 0){
            return doc._sequences[0]._elements
        }
        return ''
    }

Is this a good assumption?

if not. Do you have any example SBOL files parsed by SbolJs for extracting the sequence?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions