realmichaelhoffert / mgeasysim

Cause simulating MG data should be easy
MIT License
0 stars 0 forks source link

Remove hard-coded arguments. #4

Open realmichaelhoffert opened 4 hours ago

realmichaelhoffert commented 4 hours ago

Hard coded arguments should be removed and replaced with options to input arguments or load with a configuration file. Specifically, here:

community.py lines 199-200:

        for j, (index, row) in enumerate(alt_data.iterrows()):

            # print(alternate)
            alternate = index
            original = alts.index[j]
            val = simulation.loc[original, 'abun'] / np.random.choice([0.5, 2])
            alt_data.loc[alternate, 'abun'] = val
            alt_data.loc[alternate, 'strain_present'] = 2
            simulation.loc[original, 'strain_present'] = 1
            logger.info('Original: {original}, alt: {alt}, abun: {val}')

Alter code to modify how strains can be incorporated

simulate.py line 75-80 to remove ART illumina requirement

if not os.path.exists(f'{outfile}_R1.fq.gz'):
                command1 = f'art_illumina -ss HS25 -i {file} -l 150 -f {fold_coverage} -d {row['index']} -m 300 -s 5 -o {outfile}_R -p'
                command2 = f'gzip {outfile}_R*'
                read_simulations.append(f'{command1} && {command2}')
                logger.info(f'Added command: {command1} && {command2}')