Thanks for the script. It seems not to work for me though.
I have tried all three options for lookmod.py. see below. Only the look options works. I used a test fastA file as input.
$ python lookmod_genome.py -m look -p GL988041:10:20 -g test -r test/test.fa
-----------------------------------------
Mode : look
Fasta file : test/test.fa
Position : GL988041:10:20
Surroundings length : 10
-----------------------------------------
----------------------
------ LOOK ------
----------------------
-> GAAAAAAAAA**GCCGTGCCGT
$ python lookmod_genome.py -m modify -g test -r test/test.fa -c test/insertion.fa
-----------------------------------------
Mode : modify
Fasta file : test/test.fa
Construction file : test/insertion.fa
Output file rename: test.fa
-----------------------------------------
Traceback (most recent call last):
File "lookmod_genome.py", line 499, in <module>
main(sys.argv[1:])
File "lookmod_genome.py", line 474, in main
for key, value in added_dict.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
$ python lookmod_genome.py -m modify -g test -r test/test.fa -c test/insertion.fa -i test/output.txt
-----------------------------------------
Mode : modify
Fasta file : test/test.fa
Construction file : test/insertion.fa
Output file rename: test.fa
Output information File : test/output.txt
-----------------------------------------
Traceback (most recent call last):
File "lookmod_genome.py", line 499, in <module>
main(sys.argv[1:])
File "lookmod_genome.py", line 474, in main
for key, value in added_dict.iteritems():
AttributeError: 'dict' object has no attribute 'iteritems'
$ head test/test.fa
>GL988041 dna:supercontig supercontig:CTHT_3.0:GL988041:1:6909506:1 REF
GAAAAAAAAAAAAAAAAGAGCCGTGCCGTAGCCCAGTTTTGAACTCTGAAGCCAGATCAG
ACGCGGGATGCAGGAGACCTGGGTGCGGGAGGTGCGGCAGCTGGCCCAAACGGTGCTGCA
GACCTTTTTGCATTGAAGCCCATTTTCACATCCTCTTTTCGTTCTTCCTCCGTCTCCTTC
Do the strings in the chromosome name need to have a certain structure? are spaces or symbols allowed in the names?
I can't figure out what dict it looks for.
Not tested myself but
seqkit mutatehttps://bioinf.shenwei.me/seqkit/usage/#mutate seems to do that.Yes it supports this and you can choose which chromosomes/sequences to insert.