Mercurial > repos > public-health-bioinformatics > fastp_json_to_tabular
annotate fastp_json_to_tabular.py @ 3:e342bf27e717 draft
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
| author | public-health-bioinformatics | 
|---|---|
| date | Thu, 10 Mar 2022 19:03:59 +0000 | 
| parents | dc655c5e77d6 | 
| children | b86961fa4ac4 | 
| rev | line source | 
|---|---|
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
1 #!/usr/bin/env python | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
2 | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
3 import argparse | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
4 import json | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
5 | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
6 def main(args): | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
7 with open(args.fastp_json, 'r') as f: | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
8 fastp_report = json.load(f) | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
9 | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
10 reads_single_paired = fastp_report['summary']['sequencing'].split(' ')[0] | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
11 | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
12 if reads_single_paired == 'paired': | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
13 total_read_pairs_before_filtering = str(int(fastp_report['summary']['before_filtering']['total_reads']) / 2) | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
14 total_read_pairs_after_filtering = str(int(fastp_report['summary']['after_filtering']['total_reads']) / 2) | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
15 read2_mean_length_before_filtering = fastp_report['summary']['before_filtering']['read2_mean_length'] | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
16 read2_mean_length_after_filtering = fastp_report['summary']['after_filtering']['read2_mean_length'] | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
17 else: | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
18 total_read_pairs_before_filtering = 'NA' | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
19 total_read_pairs_after_filtering = 'NA' | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
20 read2_mean_length_before_filtering = 'NA' | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
21 read2_mean_length_after_filtering = 'NA' | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
22 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
23 total_reads_before_filtering = fastp_report['summary']['before_filtering']['total_reads'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
24 total_reads_after_filtering = fastp_report['summary']['after_filtering']['total_reads'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
25 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
26 total_bases_before_filtering = fastp_report['summary']['before_filtering']['total_bases'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
27 total_bases_after_filtering = fastp_report['summary']['after_filtering']['total_bases'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
28 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
29 read1_mean_length_before_filtering = fastp_report['summary']['before_filtering']['read1_mean_length'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
30 read1_mean_length_after_filtering = fastp_report['summary']['after_filtering']['read1_mean_length'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
31 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
32 q20_bases_before_filtering = fastp_report['summary']['before_filtering']['q20_bases'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
33 q20_bases_after_filtering = fastp_report['summary']['after_filtering']['q20_bases'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
34 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
35 q20_rate_before_filtering = fastp_report['summary']['before_filtering']['q20_rate'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
36 q20_rate_after_filtering = fastp_report['summary']['after_filtering']['q20_rate'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
37 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
38 q30_bases_before_filtering = fastp_report['summary']['before_filtering']['q30_bases'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
39 q30_bases_after_filtering = fastp_report['summary']['after_filtering']['q30_bases'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
40 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
41 q30_rate_before_filtering = fastp_report['summary']['before_filtering']['q30_rate'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
42 q30_rate_after_filtering = fastp_report['summary']['after_filtering']['q30_rate'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
43 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
44 gc_content_before_filtering = fastp_report['summary']['before_filtering']['gc_content'] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
45 gc_content_after_filtering = fastp_report['summary']['after_filtering']['gc_content'] | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
46 if 'adapter_cutting' in fastp_report: | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
47 adapter_trimmed_reads = fastp_report['adapter_cutting']['adapter_trimmed_reads'] | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
48 adapter_trimmed_bases = fastp_report['adapter_cutting']['adapter_trimmed_bases'] | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
49 else: | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
50 adapter_trimmed_reads = 0 | 
| 
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
51 adapter_trimmed_bases = 0 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
52 | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
53 output_fields = [ | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
54 'total_reads_before_filtering', | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
55 'total_read_pairs_before_filtering', | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
56 'total_reads_after_filtering', | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
57 'total_read_pairs_after_filtering', | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
58 'total_bases_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
59 'total_bases_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
60 'read1_mean_length_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
61 'read1_mean_length_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
62 'read2_mean_length_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
63 'read2_mean_length_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
64 'q20_bases_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
65 'q20_bases_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
66 'q20_rate_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
67 'q20_rate_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
68 'q30_bases_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
69 'q30_bases_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
70 'q30_rate_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
71 'q30_rate_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
72 'gc_content_before_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
73 'gc_content_after_filtering', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
74 'adapter_trimmed_reads', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
75 'adapter_trimmed_bases', | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
76 ] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
77 | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
78 output_data = [] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
79 if args.sample_id: | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
80 output_fields = ['sample_id'] + output_fields | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
81 output_data = [args.sample_id] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
82 | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
83 print(args.delimiter.join(output_fields)) | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
84 | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
85 output_data = output_data + [ | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
86 total_reads_before_filtering, | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
87 total_read_pairs_before_filtering, | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
88 total_reads_after_filtering, | 
| 
3
 
e342bf27e717
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit fb12c97e94741abedc71332572bdcb33338504a7"
 
public-health-bioinformatics 
parents: 
0 
diff
changeset
 | 
89 total_read_pairs_after_filtering, | 
| 
0
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
90 total_bases_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
91 total_bases_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
92 read1_mean_length_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
93 read1_mean_length_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
94 read2_mean_length_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
95 read2_mean_length_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
96 q20_bases_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
97 q20_bases_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
98 q20_rate_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
99 q20_rate_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
100 q30_bases_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
101 q30_bases_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
102 q30_rate_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
103 q30_rate_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
104 gc_content_before_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
105 gc_content_after_filtering, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
106 adapter_trimmed_reads, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
107 adapter_trimmed_bases, | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
108 ] | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
109 print(args.delimiter.join(map(str, output_data))) | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
110 | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
111 | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
112 if __name__ == "__main__": | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
113 parser = argparse.ArgumentParser() | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
114 parser.add_argument('fastp_json') | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
115 parser.add_argument('-s', '--sample-id') | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
116 parser.add_argument('-d', '--delimiter', default='\t') | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
117 args = parser.parse_args() | 
| 
 
dc655c5e77d6
"planemo upload for repository https://github.com/public-health-bioinformatics/galaxy_tools/tree/master/tools/fastp_json_to_tabular commit c6ac9f7bd10c58d2b4168cab62b812d4d76283fe"
 
public-health-bioinformatics 
parents:  
diff
changeset
 | 
118 main(args) | 
