I just did this:
$ time cat ~/Downloads/1.23andme.9.txt | grep -v '#' | cut -f 1,4
--output-delimiter=, | sed "s/^/42,/" | psql snpr_development -c 'copy
user_snps (genotype_id,snp_name,local_genotype) from STDIN with (FORMAT
CSV, HEADER FALSE, DELIMITER ",")'
And it returned this:
cat ~/Downloads/1.23andme.9.txt 0.00s user 0.02s system 0% cpu 20.688 total
grep -v '#' 0.10s user 0.02s system 0% cpu 20.875 total
cut -f 1,4 --output-delimiter=, 0.18s user 0.03s system 0% cpu 20.877 total
sed "s/^/42,/" 0.65s user 0.01s system 3% cpu 21.034 total
psql snpr_development -c 0.19s user 0.02s system 0% cpu 22.226 total
:)
This of course only covers creating the user_snps and support for
23andme, but it shouldn't be that hard to extend it.
Seems worth it to me! What do you think?
--
XMPP+OTR:
helge....@jabber.ccc.de
Threema: TXFZ3MFV