Micropower tutorial

Has anyone ever run through this tutorial?

I'm getting some error messages when I try and run this. The first error is in this command:

IDs <- select(project_catalog, Sequence.Read.Archive.ID, HMP.Isolation.Body.Site, Gene.Count) %>% filter(HMP.Isolation.Body.Site=='gastrointestinal_tract' & Gene.Count>0) %>% .$Sequence.Read.Archive.ID length(IDs)

The error message is "unexpected symbol in IDs". It will run Ok if I delete the last %>% and everything following, but I'm afraid deleting that portion is causing errors in the next command :

tsvs<-lapply(IDs, function(x) read.csv(file.path(PATH,paste0(x,'.tsv')),sep='\t') %>% transmute(Reference.Name=Reference.Name,Nreads=DepthBreadthTotal.reference.bases/10000))

That throws an error of "Error in file(file, "rt") : invalid 'description' argument

I think they just missed a newline:

IDs <- select(project_catalog, Sequence.Read.Archive.ID, HMP.Isolation.Body.Site, Gene.Count) %>%
  filter(HMP.Isolation.Body.Site=='gastrointestinal_tract' & Gene.Count>0) %>%
  .$Sequence.Read.Archive.ID

length(IDs)

That was it; thank you!!

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.