Before I report this as a bug can someone show me the proper way to add metadata using the `AddMetaData` function.

I first read a file that is new line delimited with the meta data labels I want using read table. The ftimecell_columns.txt file looks like this:

    "12wks"
    "12wks"
    "12wks"
    "12wks"
    "12wks"
    ...

So I do this command to make the dataframe:

    timecell_col <- read.table("~/Projects/FetalPancreas/timecell_columns.txt", header=FALSE, sep="\n")

and then this to AddMetaData:

    AddMetaData(object = scfp, metadata = timecell_col, col.name = 'time.cell')

However, when I do:

    head(x = scfp@meta.data)

All I see is the original meta data values:

               orig.ident nCount_RNA nFeature_RNA
    GSM2978830   scfetpan     382565         5080
    GSM2978831   scfetpan     634726         4932
    GSM2978832   scfetpan     565912         4501
    GSM2978833   scfetpan     717152         5117
    GSM2978834   scfetpan     207659         3508
    GSM2978835   scfetpan     869148         5055

Am I reading the data in correctly?

Any help would be appreciated!

Very Respectfully,
Pratik
So figured it out. Months later, but nonetheless got it.

For reference: My column names were the GSM sample names because I downloaded the data from GEO, where each GSM####### corresponds to a cell (see image below:

![enter image description here][1]


Your gene expression matrix/data frame should be cells as column names, and genes as row names.

It may be obvious to some, but it was not obvious to me then. In order to add meta data. Your **meta data, data frame should have your row names as cells** and the **corresponding meta data information should be the row values, so it should look something like this**, and lastly **your column names should be what you want that meta data to be named** see below:


![enter image description here][2]


If your meta data, data frame is arranged in the way. You could simply do a modification of the default Seurat command like this by adding the `meta.data = yourmetadata` like so:

    scfp <- CreateSeuratObject(counts = df, project = 'scfp', meta.data = SCFPmetadata, min.cells = 3, min.features = 200)

or the following after your make your Seurat object:

    scfp <- AddMetaData(object = scfp, metadata = SCFPmetadata)

  [1]: /media/images/7f0a6f5c-47f6-4b38-9267-61b235ee
  [2]: /media/images/9ac4db2f-b63a-44b9-a85f-c8c127c8

Hope this helps!