#!/usr/bin/env python
# coding: utf-8

'''
Program developed at Pop lab at the CBCB, University of Maryland by 
Harihara Subrahmaniam Muralidharan, Nidhi Shah, Jacquelyn S Meisel. 
'''

import argparse as ap
from Binnacle_IO_Utility import *
from Clustering_Utility import *

parser = ap.ArgumentParser(description="binnacle: A tool for binning metagenomic datasets using assembly graphs and scaffolds generated by metacarvel."+ 
                           "Estimate_Abundances.py estimates abundance for scaffolds generated by MetaCarvel. The program Collate.py collects the summary \
                           files generated by Estimate_Abundances.py")
parser.add_argument("-d","--dir", help="Output directory that contains the summary files generated by running Estimate_Abundances.py", required=True)
parser.add_argument("-m","--method", help="Binning method to format the output to. Presently we support 1. Metabat 2. Maxbin 3. Concoct 4. Binnacle (Default)", 
                    required=False, default = 'binnacle')
parser.add_argument("-k","--keep", default="True", help="Retain the summary files generated by Estimate_Abundances.py. Defaults to True", required=False)
args = parser.parse_args()

summary_dir = args.dir
summary_method = args.method

df_summary = Format_Outputs(summary_dir, summary_method)
print(df_summary.head())

if summary_method.lower().startswith('metabat') or summary_method.lower().startswith('binnacle'):
    df_summary.to_csv(summary_dir+'Feature-Matrix-'+summary_method+'.txt', sep = '\t')
else:
    df_summary.to_csv(summary_dir+'Feature-Matrix-'+summary_method+'.txt', sep = '\t', header = False)
2fcb987210ef34f7fb77dae75f71a31a828d950e
<mask token>

<mask token>
parser.add_argument('-d', '--dir', help=
    'Output directory that contains the summary files generated by running Estimate_Abundances.py'
    , required=True)
parser.add_argument('-m', '--method', help=
    'Binning method to format the output to. Presently we support 1. Metabat 2. Maxbin 3. Concoct 4. Binnacle (Default)'
    , required=False, default='binnacle')
parser.add_argument('-k', '--keep', default='True', help=
    'Retain the summary files generated by Estimate_Abundances.py. Defaults to True'
    , required=False)
<mask token>
print(df_summary.head())
if summary_method.lower().startswith('metabat') or summary_method.lower(
    ).startswith('binnacle'):
    df_summary.to_csv(summary_dir + 'Feature-Matrix-' + summary_method +
        '.txt', sep='\t')
else:
    df_summary.to_csv(summary_dir + 'Feature-Matrix-' + summary_method +
        '.txt', sep='\t', header=False)

<mask token>
parser = ap.ArgumentParser(description=
    'binnacle: A tool for binning metagenomic datasets using assembly graphs and scaffolds generated by metacarvel.'
     +
    'Estimate_Abundances.py estimates abundance for scaffolds generated by MetaCarvel. The program Collate.py collects the summary                            files generated by Estimate_Abundances.py'
    )
parser.add_argument('-d', '--dir', help=
    'Output directory that contains the summary files generated by running Estimate_Abundances.py'
    , required=True)
parser.add_argument('-m', '--method', help=
    'Binning method to format the output to. Presently we support 1. Metabat 2. Maxbin 3. Concoct 4. Binnacle (Default)'
    , required=False, default='binnacle')
parser.add_argument('-k', '--keep', default='True', help=
    'Retain the summary files generated by Estimate_Abundances.py. Defaults to True'
    , required=False)
args = parser.parse_args()
summary_dir = args.dir
summary_method = args.method
df_summary = Format_Outputs(summary_dir, summary_method)
print(df_summary.head())
if summary_method.lower().startswith('metabat') or summary_method.lower(
    ).startswith('binnacle'):
    df_summary.to_csv(summary_dir + 'Feature-Matrix-' + summary_method +
        '.txt', sep='\t')
else:
    df_summary.to_csv(summary_dir + 'Feature-Matrix-' + summary_method +
        '.txt', sep='\t', header=False)

<mask token>
import argparse as ap
from Binnacle_IO_Utility import *
from Clustering_Utility import *
parser = ap.ArgumentParser(description=
    'binnacle: A tool for binning metagenomic datasets using assembly graphs and scaffolds generated by metacarvel.'
     +
    'Estimate_Abundances.py estimates abundance for scaffolds generated by MetaCarvel. The program Collate.py collects the summary                            files generated by Estimate_Abundances.py'
    )
parser.add_argument('-d', '--dir', help=
    'Output directory that contains the summary files generated by running Estimate_Abundances.py'
    , required=True)
parser.add_argument('-m', '--method', help=
    'Binning method to format the output to. Presently we support 1. Metabat 2. Maxbin 3. Concoct 4. Binnacle (Default)'
    , required=False, default='binnacle')
parser.add_argument('-k', '--keep', default='True', help=
    'Retain the summary files generated by Estimate_Abundances.py. Defaults to True'
    , required=False)
args = parser.parse_args()
summary_dir = args.dir
summary_method = args.method
df_summary = Format_Outputs(summary_dir, summary_method)
print(df_summary.head())
if summary_method.lower().startswith('metabat') or summary_method.lower(
    ).startswith('binnacle'):
    df_summary.to_csv(summary_dir + 'Feature-Matrix-' + summary_method +
        '.txt', sep='\t')
else:
    df_summary.to_csv(summary_dir + 'Feature-Matrix-' + summary_method +
        '.txt', sep='\t', header=False)

#!/usr/bin/env python
# coding: utf-8

'''
Program developed at Pop lab at the CBCB, University of Maryland by 
Harihara Subrahmaniam Muralidharan, Nidhi Shah, Jacquelyn S Meisel. 
'''

import argparse as ap
from Binnacle_IO_Utility import *
from Clustering_Utility import *

parser = ap.ArgumentParser(description="binnacle: A tool for binning metagenomic datasets using assembly graphs and scaffolds generated by metacarvel."+ 
                           "Estimate_Abundances.py estimates abundance for scaffolds generated by MetaCarvel. The program Collate.py collects the summary \
                           files generated by Estimate_Abundances.py")
parser.add_argument("-d","--dir", help="Output directory that contains the summary files generated by running Estimate_Abundances.py", required=True)
parser.add_argument("-m","--method", help="Binning method to format the output to. Presently we support 1. Metabat 2. Maxbin 3. Concoct 4. Binnacle (Default)", 
                    required=False, default = 'binnacle')
parser.add_argument("-k","--keep", default="True", help="Retain the summary files generated by Estimate_Abundances.py. Defaults to True", required=False)
args = parser.parse_args()

summary_dir = args.dir
summary_method = args.method

df_summary = Format_Outputs(summary_dir, summary_method)
print(df_summary.head())

if summary_method.lower().startswith('metabat') or summary_method.lower().startswith('binnacle'):
    df_summary.to_csv(summary_dir+'Feature-Matrix-'+summary_method+'.txt', sep = '\t')
else:
    df_summary.to_csv(summary_dir+'Feature-Matrix-'+summary_method+'.txt', sep = '\t', header = False)