brentp / methylcode

Alignment and Tabulation of BiSulfite Treated Reads
Other
16 stars 7 forks source link

Redundant index construction #8

Open superbobry opened 10 years ago

superbobry commented 10 years ago

Is it required to re-build the index on each MethylCoder run?

brentp commented 10 years ago

Ideally, it shouldn't be, but one of the most common reports I receive is about that. It was too hard to track all cases, e.g. where an index was interrupted mid-way and was causing a lot of confusion. Either way, are you referring to bowtie, gsnap, or gsnap-meth?

gsnap-meth.py should avoid building the index.

superbobry commented 10 years ago

I'm referring to gsnap; as for all the cases, I think there's at least two simple things you can do:

  1. Add a flag like --rebuild-index. Frankly, this is hardly helpful, since a user can always rm -r the corrupted index.
  2. Write a special file after the index is successfully built and check if it exists on next launch:

    $ methylcode  --foo --bar
    building index...
    writing magic file...
    $ methylcode --foo --bar
    checking for magic file... exists!