Open jhcuarta opened 3 years ago
OK, you do not have to have a genome table, but it is a very convenient way of organizing things. Handling many genomes requires some organization, it easily becomes a mess...
What you have to have is a genome_id for each genome. This MUST be a text with GIDx, where x is some integer. If you have 143 genomes, it is natural to give the genome_id's GID1, GID2,...,GID143. I suppose you have run the panPrep()? This will add the genome_id to all filenames.
I need to see some code and error messages in order to give any further assistance on this.
Hi panPrep() invokes the genome table
for(i in 1:nrow(gnm.tbl)){
- panPrep(file.path("/home/jason/Documentos/micropan/faa", str_c(gnm.tbl$GenBank_ID[i], ".faa")),
- gnm.tbl$genome_id[i],
- file.path("/home/jason/Documentos/micropan/faa", str_c(gnm.tbl$GenBank_ID[i], ".faa")))
- } Error in nrow(gnm.tbl) : object 'gnm.tbl' not found
When i try to create the genome table it looks it has to be done file by file, since I refered the sequences' folder, and tried to invoke all files using * and no success
suppressMessages(read_delim("/home/jason/Documentos/micropan/fna/.fna", delim = ",")) Error: '/home/jason/Documentos/micropan/fna/.fna' does not exist. select(Name =
#Organism Name
, Strain, Level) Error in select(Name =#Organism Name
, Strain, Level) : object 'Strain' not found mutate(genome_id = str_c("GID", 1:n())) -> gnm.tbl Error:n()
must only be used inside dplyr verbs. Runrlang::last_error()
to see where the error occurred. rlang::last_error() <error/rlang_error>n()
must only be used inside dplyr verbs. Backtrace:
- dplyr::mutate(genome_id = str_c("GID", 1:n()))
- dplyr::n()
- dplyr:::peek_mask("n()")
- dplyr:::context_peek("mask", fun)
- context_peek_bare(name) %||% abort(glue("
{fun}
must only be used inside {location}."))
Sorry about all this mess but R programming is not my forte
Hi,
Based on what you write below, here is my suggestion for making a genome-table in R:
genome.folder <- "/home/jason/Documentos/micropan/fna" genome.files <- list.files(genome.folder, pattern = ".fna") gnm.tbl <- tibble(genome_id = str_c("GID", 1:143), genome_file = genome.files) write_delim(gnm.tbl, delim = "\t", file = "genomes_table.txt")
This creates a table with 2 columns. The first one, genome_id, is required. The second, genome_file, is just convenient.
Note that in the tutorial at GitHub (larssnip/micropan: R package for microbial pangenomics (github.com)https://github.com/larssnip/micropan) the genome table is made by first downloading from NCBI. You may create this in any way you like, e.g. by typing in all information in Excel. If you have it as an Excel file, use the readxl() function in the read_excel package to read it into R.
Above I assumed all you genome files are in the same folder ("/home/jason/Documentos/micropan/fna"). In such cases I would not include the path to the folder in the genome table, since it is the same for all files. If, however, the files are in different folders, the path should also be in the table, as another column, in order to keep track of which file is in which folder.
The table may also contain other columns, e.g. other information you may have about each genome.
The tab-separated text file created by the code above ("genomes_table.txt") is read into R using the read_delim() function:
gnm.tbl <- read_delim(“genomes_table.txt, delim = “\t”)
If you again look at the tutorial, and the section called The proteins and panPrep(), you code should now probably look something like this:
genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){ genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i])) findGenes(file.path(genome.folder, gnm.tbl$genome_file[i])) %>% filter(Score > 40) %>% gff2fasta(genome) %>% mutate(Sequence = translate(Sequence)) %>% writeFasta(file.path("tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa"))) }
The difference to the tutorial is that now you have a column genome_file, and use this, instead of using the column Genbank_ID as in the tutorial.
NB: When copying code from this email into R, you need to replace the quotes (“) since they always come out wrong in emails… re-type them in the R script.
LS
LS
From: jhcuarta @.> Sent: onsdag 25. august 2021 22:57 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi panPrep() invokes the genome table
for(i in 1:nrow(gnm.tbl)){
· panPrep(file.path("/home/jason/Documentos/micropan/faa", str_c(gnm.tbl$GenBank_ID[i], ".faa")),
*
· gnm.tbl$genome_id[i],
*
· file.path("/home/jason/Documentos/micropan/faa", str_c(gnm.tbl$GenBank_ID[i], ".faa")))
*
When i try to create the genome table it looks it has to be done file by file, since I refered the sequences' folder, and tried to invoke all files using * and no success
suppressMessages(read_delim("/home/jason/Documentos/micropan/fna/.fna", delim = ",")) Error: '/home/jason/Documentos/micropan/fna/.fna' does not exist. select(Name = #Organism Name, Strain, Level) Error in select(Name = #Organism Name, Strain, Level) : object 'Strain' not found mutate(genome_id = str_c("GID", 1:n())) -> gnm.tbl Error: n() must only be used inside dplyr verbs. Run rlang::last_error() to see where the error occurred. rlang::last_error() <error/rlang_error> n() must only be used inside dplyr verbs. Backtrace:
Sorry about all this mess but R programming is not my forte
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/larssnip/micropan/issues/10#issuecomment-905868118, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADJZZFXCYFFUPSOV7JZVXY3T6VKKRANCNFSM5CPAW3HQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
- genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
- findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
- filter(Score > 40)
- gff2fasta(genome)
- mutate(Sequence = translate(Sequence))
- writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))} Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
Hi,
Could you please copy the exact code/output into the email? As it is now, I cannot see any %>% operators in there?
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/larssnip/micropan/issues/10#issuecomment-906592043, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.
Hi again,
It is better to actually include the R script file as an attachment to the email.
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/larssnip/micropan/issues/10#issuecomment-906592043, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email.
Hi I attached the project
Regards micropan_R.zip
Hi I attached the R project session, otherwise let me know how to get the file you require
El vie, 27 ago 2021 a las 1:17, Lars Snipen @.***>) escribió:
Hi again,
It is better to actually include the R script file as an attachment to the email.
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-906592043>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS< https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android< https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-906954602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUY7JFAKNVPNHU5XSBKJ3CLT64UWNANCNFSM5CPAW3HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
El sáb, 28 ago 2021 a las 19:08, JAISON HERNAN CUARTAS GALLEGO (< @.***>) escribió:
Hi I attached the R project session, otherwise let me know how to get the file you require
El vie, 27 ago 2021 a las 1:17, Lars Snipen @.***>) escribió:
Hi again,
It is better to actually include the R script file as an attachment to the email.
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-906592043>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS< https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android< https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-906954602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUY7JFAKNVPNHU5XSBKJ3CLT64UWNANCNFSM5CPAW3HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
Hi,
This archive contained no R scripts, i.e. files with extension .R
I need to see the code you are using. The code you pasted into a previous email, where did you get that from? It must be some file somewhere? Such code is typically stored in script-files. RStudio always ensure they get the proper .R ending.
LS
From: jhcuarta @.> Sent: søndag 29. august 2021 02:09 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I attached the R project session, otherwise let me know how to get the file you require
El vie, 27 ago 2021 a las 1:17, Lars Snipen @.***>) escribió:
Hi again,
It is better to actually include the R script file as an attachment to the email.
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-906592043>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS< https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android< https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-906954602, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUY7JFAKNVPNHU5XSBKJ3CLT64UWNANCNFSM5CPAW3HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/larssnip/micropan/issues/10#issuecomment-907706007, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADJZZFQ76EXV6YIRHEYQXDTT7F3DBANCNFSM5CPAW3HQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi Here's the script
Regards
El dom, 29 ago 2021 a las 6:48, Lars Snipen @.***>) escribió:
Hi,
This archive contained no R scripts, i.e. files with extension .R
I need to see the code you are using. The code you pasted into a previous email, where did you get that from? It must be some file somewhere? Such code is typically stored in script-files. RStudio always ensure they get the proper .R ending.
LS
From: jhcuarta @.> Sent: søndag 29. august 2021 02:09 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I attached the R project session, otherwise let me know how to get the file you require
El vie, 27 ago 2021 a las 1:17, Lars Snipen @.***>) escribió:
Hi again,
It is better to actually include the R script file as an attachment to the email.
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-906592043>, or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android<
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-906954602,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AUY7JFAKNVPNHU5XSBKJ3CLT64UWNANCNFSM5CPAW3HQ>
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-907706007>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADJZZFQ76EXV6YIRHEYQXDTT7F3DBANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS< https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android< https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-907778641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUY7JFB5D2QVOVFT3IKNOKLT7INBNANCNFSM5CPAW3HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
???
I see no script and no attachment…
LS
From: jhcuarta @.> Sent: søndag 29. august 2021 20:19 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi Here's the script
Regards
El dom, 29 ago 2021 a las 6:48, Lars Snipen @.***>) escribió:
Hi,
This archive contained no R scripts, i.e. files with extension .R
I need to see the code you are using. The code you pasted into a previous email, where did you get that from? It must be some file somewhere? Such code is typically stored in script-files. RStudio always ensure they get the proper .R ending.
LS
From: jhcuarta @.> Sent: søndag 29. august 2021 02:09 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I attached the R project session, otherwise let me know how to get the file you require
El vie, 27 ago 2021 a las 1:17, Lars Snipen @.***>) escribió:
Hi again,
It is better to actually include the R script file as an attachment to the email.
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-906592043>, or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android<
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-906954602,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AUY7JFAKNVPNHU5XSBKJ3CLT64UWNANCNFSM5CPAW3HQ>
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-907706007>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADJZZFQ76EXV6YIRHEYQXDTT7F3DBANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS< https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android< https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-907778641, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUY7JFB5D2QVOVFT3IKNOKLT7INBNANCNFSM5CPAW3HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/larssnip/micropan/issues/10#issuecomment-907842648, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADJZZFQZNM2WRQWERX3PN43T7J2ZLANCNFSM5CPAW3HQ. Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
Hi Here they are
El dom, 29 ago 2021 a las 14:16, Lars Snipen @.***>) escribió:
???
I see no script and no attachment…
LS
From: jhcuarta @.> Sent: søndag 29. august 2021 20:19 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi Here's the script
Regards
El dom, 29 ago 2021 a las 6:48, Lars Snipen @.***>) escribió:
Hi,
This archive contained no R scripts, i.e. files with extension .R
I need to see the code you are using. The code you pasted into a previous email, where did you get that from? It must be some file somewhere? Such code is typically stored in script-files. RStudio always ensure they get the proper .R ending.
LS
From: jhcuarta @.> Sent: søndag 29. august 2021 02:09 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I attached the R project session, otherwise let me know how to get the file you require
El vie, 27 ago 2021 a las 1:17, Lars Snipen @.***>) escribió:
Hi again,
It is better to actually include the R script file as an attachment to the email.
LS
From: jhcuarta @.> Sent: torsdag 26. august 2021 19:13 To: larssnip/micropan @.> Cc: Lars-Gustav Snipen @.>; Comment @.> Subject: Re: [larssnip/micropan] Genome table (#10)
Hi I created the genome table successfully, nevertheless i got an error when trying to translate
dir.create("/home/jason/Documentos/micropan/tmp") genome.folder <- "/home/jason/Documentos/micropan/fna" for(i in 1:nrow(gnm.tbl)){
· genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· findGenes(file.path(genome.folder, gnm.tbl$genome_file[i]))
·
*
· filter(Score > 40)
·
*
· gff2fasta(genome)
·
*
· mutate(Sequence = translate(Sequence))
·
*
· writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “.fna”, ".faa")))}
·
*
Error: unexpected input in: " mutate(Sequence = translate(Sequence)) writeFasta(file.path("/home/jason/Documentos/micropan/tmp", str_replace(gnm.tbl$genome_file[i], “"
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-906592043>,
or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ADJZZFX2A6LCLHBFEFDLZJLT6ZYZDANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android<
https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-906954602,
or unsubscribe <
https://github.com/notifications/unsubscribe-auth/AUY7JFAKNVPNHU5XSBKJ3CLT64UWNANCNFSM5CPAW3HQ>
. Triage notifications on the go with GitHub Mobile for iOS <
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android <
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-907706007>, or unsubscribe<
https://github.com/notifications/unsubscribe-auth/ADJZZFQ76EXV6YIRHEYQXDTT7F3DBANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS<
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android<
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-907778641,
or unsubscribe < https://github.com/notifications/unsubscribe-auth/AUY7JFB5D2QVOVFT3IKNOKLT7INBNANCNFSM5CPAW3HQ>
. Triage notifications on the go with GitHub Mobile for iOS < https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub< https://github.com/larssnip/micropan/issues/10#issuecomment-907842648>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADJZZFQZNM2WRQWERX3PN43T7J2ZLANCNFSM5CPAW3HQ>.
Triage notifications on the go with GitHub Mobile for iOS< https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android< https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/larssnip/micropan/issues/10#issuecomment-907853978, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUY7JFF5WIELNDDQ5B7YSNLT7KBQ3ANCNFSM5CPAW3HQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
-- Aviso legal: El contenido de este mensaje y los archivos adjuntos son confidenciales y de uso exclusivo de la Universidad Nacional de Colombia. Se encuentran dirigidos sólo para el uso del destinatario al cual van enviados. La reproducción, lectura y/o copia se encuentran prohibidas a cualquier persona diferente a este y puede ser ilegal. Si usted lo ha recibido por error, infórmenos y elimínelo de su correo. Los Datos Personales serán tratados conforme a la Ley 1581 de 2012 y a nuestra Política de Datos Personales que podrá consultar en la página web www.unal.edu.co http://www.unal.edu.co/. Las opiniones, informaciones, conclusiones y cualquier otro tipo de dato contenido en este correo electrónico, no relacionados con la actividad de la Universidad Nacional de Colombia, se entenderá como personales y de ninguna manera son avaladas por la Universidad.
Hi Mr Lars I've reinstalled my OS I'm getting the following error when i run the script (attached) that follows.
Error in findGenes(file.path(genome.folder, gnm.tbl$genome_file[i])) : First argument must be table with columns Header and Sequence
library(micropan) library(R.utils) library(ggdendro) library(readr) library(seqinr) library(tidyverse) genome.folder <- "/home/jason/Documents/micropan/fna" genome.files <- list.files(genome.folder, pattern = ".fna") gnm.tbl <- tibble(genome_id = str_c("GID", 1:143), genome_file = genome.files) write_delim(gnm.tbl, delim = "\t", file = "genomes_table.txt") genome.folder <- "/home/jason/Documents/micropan/fna" for(i in 1:nrow(gnm.tbl)){ genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i])) findGenes(file.path(genome.folder, gnm.tbl$genome_file[i])) %>% filter(Score > 40) %>% gff2fasta(genome) %>% mutate(Sequence = translate(Sequence)) %>% writeFasta(file.path("/home/jason/Documents/micropan/tmp", str_replace(gnm.tbl$genome_file[i], ".faa"))) }
Thanks in advance for your support Best regards
Have you installed the prodigal software? The function findGenes uses this external software (outside R).
Hi Yes, I did. The problem seems to be related to genomes table, it is created but just one row. The first file and its sequence. Thats why it expects a table with columns Header and Sequence
Hi again,
OK, I found the problem. The findGenes function is used wrongly in my example code for micropan. In your code you have a for-loop. The first you do inside the for-loop is to read in the genome:
genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
This is fine. But, then the code says
findGenes(file.path(genome.folder, gnm.tbl$genome_file[i])) %>%...etc
Notice the input here is the exact same filename used to read in the genome in the line before. The correct here should be
findGenes(genome) %>%...etc
i.e. use as input the genome read in at the line before.
The findGenes function in the microseq-package has been changed. Previosuly it tokk as input the filename where the genome is, now it takes as input the genome itself. I will update the micropan-example accordingly. Thanks for noticing.
Hi I've modified the scrip but i get the following error
Error: Problem with mutate()
column Sequence
.
ℹ Sequence = translate(Sequence)
.
x sequence is not a vector of chars
Run rlang::last_error()
to see where the error occurred.
I guess the problem resides in the scripts line
for(i in 1:nrow(gnm.tbl)){ genome <- readFasta(file.path(genome.folder, gnm.tbl$genome_file[i]))
I guess so since genome is a table having header and sequence, nevertheless this table only has one row, and mutate() is expecting a vector
Hi
Genome table video displays an error, it says the current request is not valid
Hi The .txt file serves for downloading?, how do i run the commands using the files already downloaded. I got 442 genomes
Hi
I'm trying to run micropan but when I try the blastall and downstream functions I got the headers error, I guess is due to the lack of a genome table. I'm stuck and I woud like to get help, I have 143 genome sequences in any required format .faa .fna .gff, R is not my expertise but I can handle running commands
Regards