Sunday, December 14, 2014

Expat Travel Insurance (Part 2)

If you’ve settled upon travel insurance to cover illness/accident on your visit back to your country of citizenship (queue USA chant), it’s decision time on the exact policy.

There is a staggering array of choice, divided into three main product types:

  • Single-trip
  • Multi-trip
  • Backpacker

While there are tools to narrow the search, I am not aware of any that will take the unique concerns of expats (e.g. cover in country of citizenship) into consideration. This means reading terms and conditions: you cannot take for granted that the policy will be right for you, since the screens available are designed for vanilla residence==citizenship types.

For the UK-based among us, this means using a comparison engine like Money Super Market or Confused.

Comparison engine evilness

  • For underwriting purposes, your age is fair game, but not personal identifying information such as Name, email or phone number. I used the traditional ‘abc xyz’ and as work arounds.
  • Check the insurance agent directly. You will almost certainly find price discrepancies between going direct with the agent and going through the comparison engine.
  • For visits longer than ~7days, check both single-trip and annual multi-trip rates. I found the break-even point is between the two types of products 7-10 days.

Debenhams evilness

After reading through 1/2 dozen terms and conditions, I settled upon an annual multi-trip policy fronted by Debenhams. Cheaper than many single-trip policies for my length-of-stay.

There is much evilness to be had here, but some of their competitors were even worse…
* £30.60 for the Gold policy from Confused versus the (as far as I can tell identical) £61.51 Superior policy ‘direct’ from Debenhams.
* ‘Direct’ is a bit of a misnomer since Debenhams is a front. The policies are actually underwritten by Rock Insurance, which is itself the UK-front for a Swedish firm named SOLID Försäkringar. If it’s any consolation, both firms are registered with the Financial Services Authority [1, 2]. Though, if anything goes amiss, I have more faith in Debenhams attempting to salvage the reputation of its personal finance business than the FSA.
* The 3-star Defaqto rating is sufficient. Self-insure against luggage loss and cancellation, so the extra coverage that the 4/5 star policies cover in these areas is irrelevant. Given that the legal coverage for ‘high street’ policies is a joke (£15k), all they’re worth is the medical (£10M) and personal liability (£2M) cover.
* If you’re an expat considering travel insurance, be aware that you aren’t really protected against a very serious illness/accident, see Part 1.

Debenhams BEYOND evil

Saving the most evil for last…
* Buried in the terms and conditions there is an automatic renewal clause, BEYOND evil IMHO. Opt-out can be performed online:
* Making Melkor look like Wayne Brady, some companies have a written-only or phone-only (invariably an 0845 or other premium rate number) opt-out. Unspeakably evil.

As with all things, YMMV.

Written with StackEdit.

Expat Travel Insurance (Part 1)

At times, US policy seems designed to make life difficult for expats. Look no-farther than the catch 22 of insurance for trips back to the good ol’ US of A, where the protections of European-style socialized medicine do not apply.

At first glance, there are three alternatives:

  • US health insurance
  • Expat health insurance
  • Travel insurance

Each with their own unique pros/cons…

Type Eligibility US treatment Price
US Min 6mo US residence + $$
Expat Min 6mo foreign residence + $$$
Travel Min 6mo residence - $

US Health Insurance

Long-time foreign resident are wholly ineligible for US-based health insurance due to residency requirements.

For those returning stateside, good luck finding an affordable short-term PPACA compliant policy to cover the 6 month gap before eligibility in US plans.

On the upside, bless the wonks, there is an Obama-care exemption for those US citizens which pass either the bona fide resident or physical presence test under USC 26 §5000A(f)(4). Not that most non-executives could afford the premiums demanded by reasonable individual plan.

Expat health insurance

These plans generally cover treatment in either your country of citizenship or country of residence. In a perfect world, this would be the plan-type of choice for expats. Country of citizenship treatment for serious accident/illness; country of residence for more minor issues.

Unfortunately, expat health plans are often even more expensive than equivalent US-based health insurance plans. If you’re a non-exec, it’s doubtful that your company will offer this perk, so good luck affording a policy.

Travel insurance

These come in two flavors, US-based plans and foreign-based plans. Generally, there is a 6 month residence requirement, which will determine whether whether you are eligible for the US-based (min 6mo US residence) or foreign-based (min 6mo foreign residence) plans.

The biggest down-side of travel insurance is that they only cover emergency treatment, i.e. to minimize their cost, they will repatriate you ASAP to your country of residence (usually where the plan is acquired).

For relatively minor injuries (e.g. a broken leg) this level of coverage should be sufficient. However, in the event of a serious accident/illness, this money-saving tactic could kill you. For example, say you were involved in a serious car accident while visiting family in your country of citizenship. Travel insurance would cover your stabilization and medical repatriation to your country of residence (expat home). You’d then be left to the state system (e.g. NHS) with limited social/family support during recovery. Moreover, if you’re unable to work, or otherwise violate your visa conditions due to your illness/accident, you very well may face deported back to your country of citizenship, where you’d be uninsured, and more or less left to die without adequate treatment.

Seriously, it’s that dire. In a place like the US, the best an uninsured former expat could hope for is medical bankruptcy (certainty) and surviving without treatment long enough to become eligible for Medicaid (highly uncertain).

Additionally, some plans have additional restrictions on travel to the ‘home country.’ For example, if you’re an Indian national, resident in the US, your US-based plan may not cover you in India. As of yet, I’ve found no way to screen for these exceptions, other than to (attempt) to read through the 20-100 page terms and conditions for each policy.


None of the above is professional advice…far from it. If you’re in the same unfortunate boat, thrust into the complex tax and compliance situation that US policy imposes on its expat community, but can’t afford appropriate advice, good luck!

“There is no hint that help will come from elsewhere to save you.”
- R.I.P. Sagan.

PS. Given my income constraints, I’ve decided to opt for travel insurance, i.e. adequate cover for a minor illness/accident; wholly screwed in the event of a major problem.

Written with StackEdit.

Tuesday, December 2, 2014

Building blast+ databases with taxonomy ID (taxid_map)

Building NCBI BLAST+ databases with linked taxonomy is far more difficult than it should be.
For example, in taxonomy-based tools such as Kraken, mapping
1) taxonomy id to sequence id (gi or accession) and
2) taxonomy id to a human-readable taxonomy tree,
are built-in and transparent to the user.
Unfortunately, with BLAST+ these steps must be completed manually and are included in two separate programs, makeblastdb for (1) and blastn/blastp/blastx for (2).

(1) Taxonomy id <–> sequence id

In BLAST+, a taxid_map file file must be created and passed to makeblastdb
makeblastdb -in <FASTA file> -dbtype nucl -parse_seqids -taxid_map taxid_map.txt 
where taxid_map.txt is a space or tab separated list of sequence ids (either gi or accession) and taxonomy ids.
For example, with gi:
556927176 4570
556926995 4573
501594995 3914
Alternatively with accession:
NC_022714.1 4570
NC_022666.1 4573
NC_021092.1 3914
There is no turn-key way to generate this mapping taxid to sequence_id for a moderately large set of sequencing.
Fortunately, there is always a hack work-around. NCBI allows export of both the FASTA and GenBank files. The former are used as the default input for makeblastdb, and the latter contain both the sequence_id and taxid. They can both be obtained from the NCBI, searching and exporting with Send to:
enter image description here
This simple Python code snippet will do the trick for small and moderately large datasets.
from Bio import SeqIO
genbankfile = ""
f = open('taxid_map.txt','w')
for gb in SeqIO.parse(genbankfile,"gb"):
        annotations = gb.annotations['gi']
        taxid = gb.features[0].qualifiers['db_xref'][0].split(':')[1]
        f.write("{} {}\n".format(annotations, taxid))
For large datasets, the bandwidth cost of of downloading the GenBank from NCBI becomes prohibitive, and the dictionary approach would probably be warranted.
Download both the FASTA and GenBank, alternatively extract the FASTA from GenBank, e.g. with BioPython.

(2) Taxonomy id <–> Taxonomy tree

Simply include this NCBI database in the same directory as your database for the look-up to work with blastn/blastp/blastx:

Eating your cake

blastn -db <DATABASE> -query <QUERY> -outfmt "10 qseqid sseqid pident staxids sscinames scomnames sblastnames sskingdoms"
1,gi|312233363|ref|NC_014692.1|,86.26,310261,Sus scrofa taiwanensis,Sus scrofa taiwanensis,even-toed ungulates,Eukaryota
1,gi|223976078|ref|NC_012095.1|,86.26,9825,Sus scrofa domesticus,domestic pig,even-toed ungulates,Eukaryota
1,gi|5835862|ref|NC_000845.1|,86.26,9823,Sus scrofa,pig,even-toed ungulates,Eukaryota
Your comma separated file (-outfmt) showing human-readable taxonomy info.