iqbal-lab / Mykrobe-predictor

Antibiotic resistance predictions in minutes on a laptop
Other
50 stars 19 forks source link

Problem with code_generator #95

Closed FelipeMelis closed 8 years ago

FelipeMelis commented 8 years ago

The next lines are from foo_bar.py

    @property 
    def drugs(self):
        return [StaphDrugCodeGenerator(drug) for drug in self.drug_names ]

should say FooBarDrugCodeGenerator instead StaphDrugCodeGenerator?

cd code_generator
python fbarius.py
cd ..

should say foo_bar.py instead fbarius.py?

Phelimb commented 8 years ago

Hi Felipe,

You're right StaphDrugCodeGenerator should be FooBarDrugCodeGenerator and foo_bar.py should read fbarius.py (or vice versa).

If you have a specific species or panel you'd like to try out I'd be happy to help you out. The code generator has only been used by me so far so there's likely to be some bugs to iron out.

FelipeMelis commented 8 years ago

Yes i want to extend mykrobe to others genomes, i follow the tutorial but i`ve some problems with it

Phelimb commented 8 years ago

OK, any specific spot where the problems are arising?

Do you want to look at gene presence alone or do you want to consider variants also (or both).

FelipeMelis commented 8 years ago

I will try again with the code_generator and i ask you again.

I want to look first the gene presence.

Thanks a lot for your help!

Phelimb commented 8 years ago

OK,

You'll need a fasta file for each gene in data/:new_species/antibiotics

and a json or dictionary in code_generator/:new_species/gene_to_drug.json.

You look at the current code that exists where :new_species -> staph you should be able to modify it for your purpose.

Happy to help with this so keep me posted.

FelipeMelis commented 8 years ago

Hello,

I trying to modify the makefile, and i have problems with that I only have to adds this lines? (i have the fastas in antibiotics and virulences and the .json and .csv files in /code_generator/data/fbarius)

Modify the Makefile to include:

IDIR_PREDICTOR_FBARIUS = include/predictor/fbarius
src/obj/predictor/%.o : src/predictor/fbarius/%.c include/predictor/fbarius/%.h
    mkdir -p src/obj/predictor; $(CC) $(CFLAGS_PREDICTOR_CORE) $(CFLAGS_PREDICTOR) $(OPT) -c $< -o $@   

this error appears

/usr/bin/ld: no se puede abrir el fichero de salida bin/: Es un directorio
collect2: error: ld returned 1 exit status
make: *** [predictor] Error 1
Phelimb commented 8 years ago

Hi @FelipeMelis. We've changed the method for extending Mykrobe as the code generator wasn't working very well.

Please install the new version and try out the "Genotype on a catalog" section of the readme. You just need to provide a fasta of your gene panel to type. I'll write up some details on how to extend a gene panel and species ID shortly.

Let me know if you get a chance to try this out.