Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- use v6;
- use Data::Printer:from<Perl5>;
- use JSON::Tiny;
- my $json = q:to/END/;
- {
- "HG00112": {
- "discordant_multiallelic_loss": 0,
- "concordant_hom_alt": 4,
- "discordant_het_to_alt": 0,
- "discordant_hom_alt_to_ref": 0,
- "discordant_hom_ref_to_alt": 0,
- "lost_site": 0,
- "concordant_het": 3,
- "discordant_multiallelic_gain": 0,
- "discordant_hom_alt_to_het": 0,
- "discordant_call_to_no_call": 0,
- "discordant_het_to_ref": 0,
- "concordant_hom_ref": 5,
- "concordant_site": 18,
- "discordant_no_call_to_call": 0,
- "concordant_no_call": 6,
- "concordant_multiallelic": 0,
- "gained_site": 0,
- "discordant_hom_ref_to_het": 0
- }
- }
- END
- my %hash = from-json($json);
- p %hash;
- # OUTPUT:
- HG00112 {
- concordant_het 3,
- concordant_hom_alt 4,
- concordant_hom_ref 5,
- concordant_multiallelic 0,
- concordant_no_call 6,
- concordant_site 18,
- discordant_call_to_no_call 0,
- discordant_het_to_alt 0,
- discordant_het_to_ref 0,
- discordant_hom_alt_to_het 0,
- discordant_hom_alt_to_ref 0,
- discordant_hom_ref_to_alt 0,
- discordant_hom_ref_to_het 0,
- discordant_multiallelic_gain 0,
- discordant_multiallelic_loss 0,
- discordant_no_call_to_call 0,
- gained_site 0,
- lost_site 0
- } (tied to Perl6::Hash)
- } (tied to Perl6::Hash)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement