Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
XavierGrand opened this issue Aug 9, 2023 · 1 comment
Open
Labels
bug Something isn't working

Comments

@XavierGrand
Copy link

XavierGrand commented Aug 9, 2023

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 !

@youyupei youyupei added the bug Something isn't working label Nov 6, 2023
@youyupei
Copy link
Member

youyupei commented Nov 6, 2023

Hi @XavierGrand ,

Many thanks for the suggestion. Will fix it soon with your suggested code.

Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants