|
95 | 95 | " bracken_path:str = None,\n",
|
96 | 96 | " amrfinder_path:str = None,\n",
|
97 | 97 | " pmlst_path:str = None,\n",
|
| 98 | + " rmlst_path:str = None,\n", |
98 | 99 | " combine_output:bool = True,\n",
|
99 | 100 | " output_path:str = './output.tsv'):\n",
|
100 | 101 | "\n",
|
|
176 | 177 | " input_path=pmlst_path, \n",
|
177 | 178 | " output_path='parsed_pmlst.tsv'\n",
|
178 | 179 | " )\n",
|
| 180 | + "\n", |
| 181 | + " if rmlst_path is not None:\n", |
| 182 | + " if not os.path.exists(rmlst_path):\n", |
| 183 | + " raise FileNotFoundError(f\"File not found: {rmlst_path}\")\n", |
| 184 | + " process_rmlst_data(\n", |
| 185 | + " input_path=rmlst_path, \n", |
| 186 | + " output_path='parsed_rmlst.tsv',\n", |
| 187 | + " filter_columns=\"taxon,species,rank,support\",\n", |
| 188 | + " replace_header=\"match,species,rank,percentage\"\n", |
| 189 | + " )\n", |
179 | 190 | " \n",
|
180 | 191 | " if combine_output:\n",
|
181 | 192 | " # List of output files that were actually created\n",
|
|
195 | 206 | " output_files.append('parsed_bracken.tsv')\n",
|
196 | 207 | " if pmlst_path is not None:\n",
|
197 | 208 | " output_files.append('parsed_pmlst.tsv')\n",
|
| 209 | + " if rmlst_path is not None:\n", |
| 210 | + " output_files.append('parsed_rmlst.tsv')\n", |
198 | 211 | "\n",
|
199 | 212 | " # Read and concatenate all output files\n",
|
200 | 213 | " combined_df = pd.concat([pd.read_csv(file, sep='\\t') for file in output_files], axis=1)\n",
|
|
0 commit comments