HadrienG / InSilicoSeq

:rocket: A sequencing simulator
https://insilicoseq.readthedocs.io
MIT License
177 stars 32 forks source link

--n_genomes not working #133

Closed HadrienG closed 4 years ago

HadrienG commented 4 years ago

the --n_genomes/-u option supposed to pick random genomes from fasta files seems broken:

iss generate --genomes SRS121011.fasta --n_genomes 5 --model novaseq --output novaseq_reads
INFO:iss.app:Starting iss generate
INFO:iss.app:Using kde ErrorModel
INFO:iss.util:Stitching input files together
INFO:iss.app:Using lognormal abundance distribution
INFO:iss.app:Using 2 cpus for read generation
INFO:iss.app:Generating 1000000 reads
Traceback (most recent call last):
  File "/home/user/.local/bin/iss", line 11, in <module>
    sys.exit(main())
  File "/home/user/.local/lib/python3.6/site-packages/iss/app.py", line 542, in main
    args.func(args)
  File "/home/user/.local/lib/python3.6/site-packages/iss/app.py", line 186, in generate_reads
    n = args.n_genomes[0][0]
TypeError: 'int' object is not subscriptable
ma-celik commented 4 years ago

After making the suggested changes on app.py it works but this time abundance.txt screws up. It appears like this, the list goes on iss generate --genomes splitted.fasta --n_genomes 5 --model miseq --output hiseq_reads

GY193009.2153721.2155249 1.9566030924901097e-05 GY194061.5315.6843 4.148060404885818e-05 AC201870.96424.97946 0.00012397963259014452 GY222292.1.1479 2.1930273012647295e-05 GY230930.2147890.2149418 3.6387358452694063e-05 GY231983.4572.6100 0.0005489518255281374 AC091599.220.1669 5.264607562769679e-05 GY314192.4.1468 2.3352921261940462e-05 GY329294.54244.55763 8.405104955045853e-05 CT476836.21467.23325 6.149654274016014e-05 . . .

HadrienG commented 4 years ago

Should be fixed with version 1.4.5 (available via conda any moment now).