# HG changeset patch # User galaxyp # Date 1557904691 14400 # Node ID dff7df6fcab54854395a9462781e3c2512aefdf0 # Parent cd22452edec2d116e4bc5e79153a5a38f1f52d4f planemo upload for repository https://github.com/galaxyproteomics/tools-galaxyp/tree/master/tools/filter_by_fasta_ids commit f608f41d45664d04d3124c6ebc791bf8a566b3c5 diff -r cd22452edec2 -r dff7df6fcab5 filter_by_fasta_ids.py --- a/filter_by_fasta_ids.py Thu Apr 18 02:45:18 2019 -0400 +++ b/filter_by_fasta_ids.py Wed May 15 03:18:11 2019 -0400 @@ -61,11 +61,11 @@ parser.add_argument('-d', help='Path to discarded entries file') header_criteria = parser.add_mutually_exclusive_group() header_criteria.add_argument('--id_list', help='Path to the ID list file') - parser.add_argument('--pattern', help='regex earch attern for ID in FASTA entry') + parser.add_argument('--pattern', help='regex search pattern for ID in FASTA entry') header_criteria.add_argument('--header_regexp', help='Regular expression pattern the header should match') sequence_criteria = parser.add_mutually_exclusive_group() sequence_criteria.add_argument('--min_length', type=int, help='Minimum sequence length') - sequence_criteria.add_argument('--sequence_regexp', help='Regular expression pattern the header should match') + sequence_criteria.add_argument('--sequence_regexp', help='Regular expression pattern the sequence should match') parser.add_argument('--max_length', type=int, help='Maximum sequence length') parser.add_argument('--dedup', action='store_true', default=False, help='Whether to remove duplicate sequences') options = parser.parse_args() @@ -89,10 +89,10 @@ work_summary['duplicates'] = 0 if options.id_list: - targets = [] + targets = set() with open(options.id_list) as f_target: for line in f_target: - targets.append(line.strip().upper()) + targets.add(line.strip().upper()) work_summary['wanted'] = len(targets) homd_db = FASTAReader_gen(options.i) diff -r cd22452edec2 -r dff7df6fcab5 filter_by_fasta_ids.xml --- a/filter_by_fasta_ids.xml Thu Apr 18 02:45:18 2019 -0400 +++ b/filter_by_fasta_ids.xml Wed May 15 03:18:11 2019 -0400 @@ -1,4 +1,4 @@ - + on the headers and/or the sequences