-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #64 from mdmparis/add_adf
Add ADF and pandas posttreatment
- Loading branch information
Showing
18 changed files
with
2,154 additions
and
3,423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "1.3.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,5 @@ | ||
import os | ||
import csv | ||
from defense_finder_posttreat import best_solution | ||
|
||
def export_defense_finder_genes(defense_finder_genes, outdir, filename): | ||
defense_finder_genes_list = defense_finder_genes_to_list(defense_finder_genes) | ||
write_defense_finder_genes(defense_finder_genes_list, outdir, filename) | ||
|
||
def defense_finder_genes_to_list(defense_finder_genes): | ||
header = best_solution.get_best_solution_keys() | ||
out = [header] | ||
for g in defense_finder_genes: | ||
l = [] | ||
for key in header: | ||
l.append(g[key]) | ||
out.append(l) | ||
return out | ||
|
||
def write_defense_finder_genes(defense_finder_genes_list, outdir, filename): | ||
filepath = os.path.join(outdir, f'{filename}_defense_finder_genes.tsv') | ||
with open(filepath, 'w') as defense_finder_genes_file: | ||
write = csv.writer(defense_finder_genes_file, delimiter='\t') | ||
write.writerows(defense_finder_genes_list) | ||
def export_defense_finder_genes(defense_finder_genes, outdir, filename): | ||
defense_finder_genes.to_csv(os.path.join(outdir, filename+'_defense_finder_genes.tsv'), sep='\t', index=False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.