Skip to content

min_width, max_width not taken into account #118

@VandaLovejoy

Description

@VandaLovejoy

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?**

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions