This question regards Vancouver referencing, though I suppose the issue could really arise regardless of what is contained in the in-text citation.
Consider the sentence:
As dogs are mammals they give birth to live young.
Clearly this is better separated:
As dogs are mammals, they give birth to live young.
But what if we feel the need to justify the statement that dogs are mammals?
As dogs are mammals , they give birth to live young.
As dogs are mammals,  they give birth to live young.
The former makes more sense to me - I intuitively would like the citation to be contained on the same side of the comma as the clause to which it relates.
But I have a feeling the latter is perhaps 'correct', and the comma should not surround the citation, just as it should not surround a parenthetical? (Which I do unashamedly anyway)