nf-sqldb icon indicating copy to clipboard operation
nf-sqldb copied to clipboard

Query to list

Open PikalaxALT opened this issue 11 months ago • 0 comments

Currently the only retrieval operation is to create a channel, however that is incompatible with queries based on existing channel. Resolving this issue requires implementation of the following construct:

import {queryToList} from 'plugin/nf-sqldb'
ch_fasta = Channel.fromList(['GRCh38', 'GRCm38'])
    .flatMap { refid ->
        queryToList( 'SELECT fasta FROM genomes WHERE id = $1', parameters: [ refId ] )
            .collect { fa -> [ [id: refId], fa ] }
    }

PikalaxALT avatar Jan 11 '25 03:01 PikalaxALT