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

min_width, max_width not taken into account #118

Open
VandaLovejoy opened this issue Jun 20, 2024 · 0 comments
Open

min_width, max_width not taken into account #118

VandaLovejoy opened this issue Jun 20, 2024 · 0 comments

Comments

@VandaLovejoy
Copy link

VandaLovejoy commented Jun 20, 2024

Hello,
Ive been using the docker://brianyee/clipper:6594e71 version. Although the main.py says that a min_width and max_width are taken into account, this is not the case. In fact many of the peaks are smaller than 10 nucleotides in length, despite the min_width being 50. Here part of the code of filter_peak.py.

if algorithm == "classic":
    peaks_dataframe['peak_length'] = peaks_dataframe['peak_length'].apply(lambda x: max(x, min_width))
peaks_dataframe['transcriptome_size'] = transcriptome_size
peaks_dataframe['transcriptome_reads'] = transcriptome_reads
peaks_dataframe['transcriptome_poisson_p'] = peaks_dataframe.apply(transcriptome_poissonP,
                                                                   axis=1) if use_global_cutoff else np.nan
peaks_dataframe['transcript_poisson_p'] = peaks_dataframe.apply(transcript_poissonP, axis=1)
peaks_dataframe['superlocal_poisson_p'] = peaks_dataframe.apply(superlocal_poissonP,
                                                                axis=1) if superlocal else np.nan

if algorithm == "classic":
    # TODO this never happens!
    peaks_dataframe['final_p_value'] = peaks_dataframe[['transcript_poisson_p', 'superlocal_poisson_p']].max(axis=1)
else:
    # TODO this is always the case!
    peaks_dataframe['final_p_value'] = peaks_dataframe[['transcript_poisson_p', 'superlocal_poisson_p']].min(axis=1)

**if bonferroni_correct:
    # TODO always True!
    peaks_dataframe = bh_correct(peaks_dataframe)
    # peaks_dataframe['final_p_value'] = (peaks_dataframe['final_p_value'] * total_clusters)    # TODO still needed?**
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant