Detect replicate id and create metadata for replicates. Resolves #3
Add test for replicates