Hi Jonathan, Felix,
if you want to keep the barcode info in the header, you can simply remove the space between two fields, for instance:
awk 'NR%4==1 {print $1 "_" $2}'
or to keep just the barcode removing 7 first symbols from the 2nd field:
awk 'NR%4==1 {print $1 "_" substr($2,8)}'
To do it on the fly (wtihout creating intermediate files) you can add this command directly to --readFilesCommand.
Or if you have zipped files, you can make a script that you supply as --readFilesCommand /path/to/script.sh
zcat $1 | awk 'NR%4==1 {print $1 "_" $2}'
Felix,
it's not clear to me what output bwa-mem -C produces. Does it add a SAM attribute (tag) with the 2nd field of the name?
It should be easy to do - will add it to my list.
Cheers
Alex