comparison long_reads_sampling.py @ 2:ccaedca97e5e draft

planemo upload for repository https://github.com/kavonrtep/galaxy_tools commit 2b3bc2334397749509cdf6fc432d891a09763c4f-dirty
author petr-novak
date Fri, 08 Dec 2023 09:17:46 +0000
parents dd46956ff61f
children
comparison
equal deleted inserted replaced
1:5596bafd2119 2:ccaedca97e5e
55 seq_summary.number_of_sequence): 55 seq_summary.number_of_sequence):
56 selected_seq_id.add(seq_id) 56 selected_seq_id.add(seq_id)
57 cummulative_length += seq_summary.id_length[seq_id] 57 cummulative_length += seq_summary.id_length[seq_id]
58 if cummulative_length >= args.total_length: 58 if cummulative_length >= args.total_length:
59 break 59 break
60 print(selected_seq_id)
61 # to make it efficient same orger is necesary 60 # to make it efficient same orger is necesary
62 selected_seq_id_ordered = [i 61 selected_seq_id_ordered = [i
63 for i in seq_summary.id_length 62 for i in seq_summary.id_length
64 if i in selected_seq_id] 63 if i in selected_seq_id]
65 curent_id = selected_seq_id_ordered.pop(0) 64 curent_id = selected_seq_id_ordered.pop(0)
89 file=sys.stderr) 88 file=sys.stderr)
90 print("Required sequence length is larger than input data, exiting", 89 print("Required sequence length is larger than input data, exiting",
91 file=sys.stderr) 90 file=sys.stderr)
92 sys.exit(1) 91 sys.exit(1)
93 92
93 print("input sequence info")
94 print("total length: ", seq_summary.total_length)
95 print("number of sequences: ", seq_summary.number_of_sequence)
94 make_sequence_sample(args, seq_summary) 96 make_sequence_sample(args, seq_summary)
95 97
96 98
97 if __name__ == "__main__": 99 if __name__ == "__main__":
98 main() 100 main()