Hmm, you must be using an older (1.8.0?) version of QIIME. The skbio software can be installed from here to get the libraries needed:
https://github.com/biocore/scikit-bio/tree/master/skbioThe mapping file is indeed the same as the normal QIIME requirements.
You would need to slightly change the code though-right now, it looks for the forward primer and cut's it out at its 3' position (and also finds the reverse primer, but since the barcode is before the forward primer, that part isn't relevant, except that you get rid of the reverse primer, which you probably want to do in any case).
E.g., if the XXXX sequence below is the forward primer:
NNNNNNbarcodeXXXXXAAAATTTCCCCGG
it finds the 3' position, and cuts it out, so you'll get
AAAATTTCCCCGG
So you'd need to modify how it's slicing out the primer, since you want to get the 8 bases before it. Line 92 in the code looks like this:
start_slice = int(curr_primer.search(seq).span()[1])
You could change it to something like this:
start_slice = int(curr_primer.search(seq).span()[0]) - 8
The change to [0] returns the position at the left of the primer, rather than the right, and -8 changes the index 8 bases to get the barcode before it. Because of the possibility that you could get a negative value here, you probably would want to add a couple of lines immediately after the above one like this (the spacing in the second line is important):
if start_slice < 0:
start_slice = 0
Hopefully this will lead to sequences that consistently start with the 8 base pair barcode, so from:
NNNNNNbarcodeXXXXXAAAATTTCCCCGG
you'll get:
barcodeXXXXXAAAATTTCCCCGG
in the output, so you can run extract_barcodes.py on it to get the first 8 bases out.