Skip to content

ag3.plot_frequencies_time_series not plotting values correctly #827

@josieshepherd

Description

@josieshepherd

It seems to me that the plotting function is not plotting the frequency values attained with ag3.snp_allele_frequencies_advanced as expected.

Example:
snp_freqs_l21f = ag3.snp_allele_frequencies_advanced(transcript = 'AGAP000519-RA',
area_by = 'admin1_iso',
period_by = 'year',
min_cohort_size = 0,
variant_query= "position == [9233552, 9233702] and aa_change == ['L21F', 'S71P']"
)

quick_summary = pd.DataFrame(snp_freqs_l21f.event_frequency.transpose(), index = snp_freqs_l21f.cohort_label, columns = ['L21F', 'S71P'])
quick_summary.sort_values('L21F', ascending = False).iloc[:20, :]
quick_summary.sort_index().iloc[42:52, :]

Image

ag3.plot_frequencies_time_series(ds = snp_freqs_l21f,
areas = 'BF-09',
taxa = 'gambiae'
)

Final plot I get:
Image

Thanks!

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