Skip to content

Problem in JWR_checker if there is no junction detected.... #7

@XavierGrand

Description

@XavierGrand

Thanks for this great tool !

I use it to identify junctions in reads, but if there is no junction in reads the JWR_checker.py raise an error due to pandas.concat() function at line 294. Then, as I integrated NanoSplicer in Nextflow, my workflow stops. So I can suggest this to replace JWR_checker.py line 294 to 301:

    d_list = [x.result() for x in futures if x.result() is not None]
    if d_list:
        d = pd.concat(d_list)
        d.to_hdf(param.outfile, 'data')
        pd.DataFrame([]).to_hdf(param.outfile, 'skipped')

        # output csv file if required
        if param.output_csv:
            d.to_csv(param.outfile + ".csv")

    else:
        empty_data = pd.DataFrame({
            'id': [],
            'mapQ': [],
            'transcript_strand': [],
            'chrID': [],
            'loc': [],
            'JAQ': []
        })
        empty_data.to_hdf(param.outfile, 'data')
        pd.DataFrame([]).to_hdf(param.outfile, 'skipped')

        if param.output_csv:
            empty_data.to_csv(param.outfile + ".csv")

The aim is to return an empty h5 and/or csv as result.
I didn't test the following steps such as JWR_subset.py or NanoSplicer.py.

Cheers !

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions