Closed RayKramp1 closed 1 year ago
Please let me know the head of your ko_abundance.
发送自 Outlook for iOShttps://aka.ms/o0ukef
发件人: RayKramp1 @.> 发送时间: Monday, April 3, 2023 5:36:23 AM 收件人: cafferychen777/ggpicrust2 @.> 抄送: Subscribed @.***> 主题: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
ko_abundance_file <- '/Users/rachaelkramp/Desktop/Selection_paper/Picrust2_analysis/pred_metagenome_unstrat.tsv'
Run ko2kegg_abundance function
kegg_abundance <- ko2kegg_abundance(file = ko_abundance_file)
R-Console feedback: "> kegg_abundance <- ko2kegg_abundance(file = ko_abundance_file) Rows: 2286 Columns: 51 ── Column specification ──────────────────────────────────────────────────────────────────────────── Delimiter: "\t" chr (1): function dbl (50): 142-Pre, 143-Pre, 147-Pre, 162-Pre, 165-Pre, 176P, 180-Pre, 181-Pre, 196-Pre, 197P, M1...
ℹ Use spec() to retrieve the full column specification for this data. ℹ Specify the column types or set show_col_types = FALSE to quiet this message. Calculation may take a long time, please be patient. The kegg pathway with zero abundance in all the different samples has been removed."
Question:
Why am I ended up with zero obs. in the abundance file?
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATZEQTXGNO7PCVHALGND7LTW7HWNPANCNFSM6AAAAAAWQRMGJE. You are receiving this because you are subscribed to this thread.Message ID: @.***>
Based on the feedback message from the R-Console, it seems that the function ko2kegg_abundance() has removed a KEGG pathway that has zero abundance in all the samples in the input file ko_abundance_file. This means that none of the samples in the input file have any measurements for that particular KEGG pathway.
There could be several reasons why a pathway has zero abundance in all the samples. It could be that the pathway is not expressed in the organisms being studied, or it could be that the pathway is expressed at very low levels that are below the detection threshold of the measurement technique being used.
It is also possible that there is an error in the input file or in the analysis pipeline that is leading to the removal of the pathway. However, without more information about the data and the analysis, it is difficult to say for certain what the cause of the zero abundance observation is.
Here is the pred_metagenome_unstrat.tsv file
It is from bacterial sequences.
I can’t see the data problem, but its result shouldn’t be all zeros.
发送自 Outlook for iOShttps://aka.ms/o0ukef
发件人: RayKramp1 @.> 发送时间: Monday, April 3, 2023 7:54:49 AM 收件人: cafferychen777/ggpicrust2 @.> 抄送: Caffery Yang @.>; Comment @.> 主题: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
It is from bacterial sequences.
― Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1493472176, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATZEQTRIRJC5LYAEBT7KM63W7IGUTANCNFSM6AAAAAAWQRMGJE. You are receiving this because you commented.Message ID: @.***>
Emmm, Please restart R session or relibrary(ggpicrust2), I use your head of data but don't get the all zeros result. You can also try ko2kegg_abundance() in ggpicrust2 R shiny .
Hello,
I tried redoing it and same result. Could it be I am not importing correctly?
You used the wrong file. ko2kegg_abundance only support KO pathway. The file you sent is EC pathway.
I also get a different error when running ko2kegg abundance
ko_abundance= read_tsv("picrust2/picrust2_out/KO_metagenome_out/pred_metagenome_unstrat.tsv") kegg_abundance <- ko2kegg_abundance(file=ko_abundance)
Error in switch(file_format, .txt = abundance <- readr::read_delim(file, : EXPR must be a length 1 vector
Please use
ko2kegg_abundance(file="picrust2/picrust2_out/KO_metagenome_out/pred_metagenome_unstrat.tsv")
ko2kegg_abundance only supports file path.
Thanks. That wasn't exactly clear from your code: ko_abundance_file <- "ko_abundance.tsv" kegg_abundance <- ko2kegg_abundance(ko_abundance_file)
Perhaps you should revise it
daa_results_df.csv Hello @JAkorli , abundance.csv
I run some codes for you. You can just use the results.
Hello Caffery Yang,
I appreciate the help and for generating the plot. However, I will be happy if I will be guided to run the codes myself and get the rest plots successfully.
Jewelna
[https://attachments.office.net/owa/jakorli%40noguchi.ug.edu.gh/service.svc/s/GetAttachmentThumbnail?id=AQMkAGIxZmEwOGIyLTk0ZTEtNGQ1Zi05NTFmLTE2NzhlNzIxNWI2YgBGAAAD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BmZjEtY2UwMC0wMDAwMDAwMDAwMDAvYXR0YWNobWVudHMub2ZmaWNlLm5ldEA5NDFiYmY1Zi1mMmMwLTQ4NzUtYTI0Yy02OTA3ODY1ZDI1MWEiLCJoYXBwIjoib3dhIn0.kOU2ifiwB_Cde_5AnNoxIkdrnrtuMOZlCSz66JFCEl8UI4hOrKKnwWqBevn0G9vXtnl0-mDGVtVQWIkpMHIXtDlO0ouXTUqF_C0RlgLC_fcaKif2r9ZXG8n_yxM-lY5WC7kp_lq85WvFmDXDOC1NZti7LE8925AV2-3NU2ach_lJTMYoCqUWZDAx-9UPfNV42fCDEp2mamFzV9aMpIfqJQCCdL3TWTPaSQYDrpjR7l9jTgaE8WmtzA-8C6D3y-H4iMlIiuXlIfoopt38xg7qqbjCn0sHFUjlLT9-rBYdBLRUgO8SvCzhVIu_g7rZ3QWcUVCZFu3UHTKQDNBYtwUYxw&X-OWA-CANARY=vtr4bgDbJkSIogyWqqJEpmAccev9NNsYLWHwounJI9QcVgQRCUSyoUk0_0GCyuRIPaQAZcWuy28.&owa=outlook.office.com&scriptVer=20230324008.13&animation=true]https://www.ug.edu.gh/
Jewelna Efua Birago Akorli (PhD)
Senior Research Fellow & Wellcome Trust Intermediate Fellow
Department of Parasitology,
Noguchi Memorial Institute for Medical Research,
College of Health Sciences
University of Ghana
Email: @.***
Website: noguchi.https://noguchi.org.gh/org.gh
From: Caffery Yang @.> Sent: 04 April 2023 10:55 To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
daa_results_df.csvhttps://github.com/cafferychen777/ggpicrust2/files/11147569/daa_results_df.csv Hello @JAkorlihttps://github.com/JAkorli , abundance.csv
I run some codes for you. You can just use the results.
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1495761336, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJRNN3D3Q45SFQEBQW3W7P4YXANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
Congratulations! I also use some of your data to create plots. You can check it ! pathway_errorbar.pdf
The code is
pathway_errorbar(abundance,daa_results_df,metadata$Vacc_St,ko_to_kegg = FALSE, p_values_threshold = 0.05,
order = "group",
p_value_bar = TRUE,
colors = NULL,
x_lab = "feature",select = c("ko00562", "ko00440", "ko04111", "ko05412", "ko00310", "ko04146", "ko00600", "ko04142", "ko00604", "ko04260", "ko04110", "ko04976", "ko05222", "ko05416", "ko00380", "ko05322", "ko00625", "ko00624", "ko00626", "ko00621"))
It's a more comprehensive version.
metadata <- read_csv("~/Downloads/pi_metadata_copy.csv")
abundance <- ko2kegg_abundance("/Users/apple/Downloads/pred_metagenome_unstrat.tsv/pred_metagenome_unstrat.tsv")
group <- "Vacc_St"
rownames(metadata) <- metadata$SampleID
daa_results_df <- ggpicrust2::pathway_daa(abundance = abundance,
metadata = metadata,
group = "Vacc_St" ,
daa_method ="ALDEx2",p.adjust = "BH")
daa_results_df[daa_results_df$method=="ALDEx2_Kruskal-Wallace test",]
pathway_errorbar(abundance,daa_results_df,metadata$Vacc_St,ko_to_kegg = FALSE, p_values_threshold = 0.05,
order = "group",
p_value_bar = TRUE,
colors = NULL,
x_lab = "feature",select = c("ko00562", "ko00440", "ko04111", "ko05412", "ko00310", "ko04146", "ko00600", "ko04142", "ko00604", "ko04260", "ko04110", "ko04976", "ko05222", "ko05416", "ko00380", "ko05322", "ko00625", "ko00624", "ko00626", "ko00621"))
Great!
Kindly help me understand something on the resulting plot of the pathway_errorbar().
What is the log2 foldchange plot on the right in reference to? I presume it Is fold change in reference to what I specify in pathway_daa(reference)? If yes, if there are 4 groups and I specify 1 of them as the reference, then which of the 3 other groups is the fold change referring to?
Jewelna
[https://attachments.office.net/owa/jakorli%40noguchi.ug.edu.gh/service.svc/s/GetAttachmentThumbnail?id=AQMkAGIxZmEwOGIyLTk0ZTEtNGQ1Zi05NTFm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iOiIwMDAwMDAwMi0wMDAwLTBmZjEtY2UwMC0wMDAwMDAwMDAwMDAvYXR0YWNobWVudHMub2ZmaWNlLm5ldEA5NDFiYmY1Zi1mMmMwLTQ4NzUtYTI0Yy02OTA3ODY1ZDI1MWEiLCJoYXBwIjoib3dhIn0.lFaei29vWSgQ_aSGcP0l4XdC-9amqfo6ktimYNdmf4K6-0AGdDtDdS5MBz_nCARfm3C6vkGuIj5RwDWFrfFYQmuAeBgMtZIhEW3MTGqXZoub6CjZnSXoGJHLqV2N47LswUT4FJ13yjgOobtG8SEEstxJ-SdysW2fNnvTTk9ykCsiShic5frhmwbhL_d2lHtfU4DamIznfmzajTMrDVnABenIuyvW0olT06gIiq3lZO37wvRyO_DsBmsBlRC_b7zG63sBHc5O4whx8imlIzlJKjItqyaGGpZVJP68I69ZECMGG6_mvtVhEM6NA2fkwVEZWOPom7ZDSJ2SadFeEUrrjw&X-OWA-CANARY=znXWLStwdky8maAWLC6uFCCWX3kDNdsYyn8YKCS9RIwX2QlWbTHpxVZ-4JyaCKV0J1n0rhcFTGY.&owa=outlook.office.com&scriptVer=20230324008.13&animation=true]https://www.ug.edu.gh/
Jewelna Efua Birago Akorli (PhD)
Senior Research Fellow & Wellcome Trust Intermediate Fellow
Department of Parasitology,
Noguchi Memorial Institute for Medical Research,
College of Health Sciences
University of Ghana
Email: @.***
Website: noguchi.https://noguchi.org.gh/org.gh
From: Caffery Yang @.> Sent: 04 April 2023 11:34 To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
Congratulations! I also use some of your data to create plots. You can check it ! pathway_errorbar.pdfhttps://github.com/cafferychen777/ggpicrust2/files/11147936/pathway_errorbar.pdf
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1495812984, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJQEYVBAT62HACLJVMDW7QBNVANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
Hello, I try repeating the same command to compare two factor levels, for example, NP and VP. SO I have formatted my metadata table and pre_metagenome_unstrat output to include only these two levels of interest. However, when I run the same commands you gave (just changing names for the new ones),
NPVP= read.csv("picrust2/picrust2_out/pi_metadata_NP_VP.csv", header=T, sep=",") abundance_NPVP <- ko2kegg_abundance("picrust2/picrust2_out/KO_metagenome_out/pred_metagenome_unstrat_NPVP.tsv") rownames(NPVP) <- NPVP$SampleID NPVP_daa_results_df <- ggpicrust2::pathway_daa(abundance = abundance_NPVP, metadata = NPVP, group = "Vacc_St" ,daa_method ="ALDEx2",p.adjust = "BH")
I get an error:
operating in serial modecomputing center with all featuresoperating in serial modeError in contrasts<-
(*tmp*
, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels
Why??
[https://attachments.office.net/owa/jakorli%40noguchi.ug.edu.gh/service.svc/s/GetAttachmentThumbnail?id=AQMkAGIxZmEwOGIyLTk0ZTEtNGQ1Zi05NTFmLTE2NzhlNzIxNWI2YgBGAAADiU37%2F0FZk0yo5YuO7cioxAcA3kRsTvbVEEeQyHKcgY4c7wAAAgEMAAAAE%2B%2FrMjbLFU%2B7iagGUsFA8wAFzmhD3AAAAAESABAAi4Fpj6rJZk6j48sIK77HqA%3D%3D&thumbnailType=2&token=eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ4OThGN0RDMjk2ODQ1MDk1RUUwREZGQ0MzODBBOTM5NjUwNDNFNjQiLCJ0eXAiOiJKV1QiLCJ4NXQiOiIySmozM0Nsb1JRbGU0Tl84dzRDcE9XVUVQbVEifQ.eyJvcmlnaW4iOiJodHRwczovL291dGxvb2sub2ZmaWNlLmNvbSIsInVjIjoiM2YzMzEwY2IwZjNiNDdjM2E2ZDNhODNjNWQxOWUzMjgiLCJzaWduaW5fc3RhdGUiOiJbXCJrbXNpXCJdIiwidmVyIjoiRXhjaGFuZ2UuQ2F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YSgwEpqcQ&X-OWA-CANARY=ODzZilt9-Ey-H0hl-CMynKCcZJsXNdsYOjH-OYQLjjleHqnuVTKb8YRTcjHJ1K2enUcq6PltFjk.&owa=outlook.office.com&scriptVer=20230324008.13&animation=true]https://www.ug.edu.gh/
Jewelna Efua Birago Akorli (PhD)
Senior Research Fellow & Wellcome Trust Intermediate Fellow
Department of Parasitology,
Noguchi Memorial Institute for Medical Research,
College of Health Sciences
University of Ghana
Email: @.***
Website: noguchi.https://noguchi.org.gh/org.gh
From: Caffery Yang @.> Sent: 04 April 2023 11:46 To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
It's a more comprehensive version.
metadata <- read_csv("~/Downloads/pi_metadata_copy.csv") abundance <- ko2kegg_abundance("/Users/apple/Downloads/pred_metagenome_unstrat.tsv/pred_metagenome_unstrat.tsv") group <- "Vacc_St"
rownames(metadata) <- metadata$SampleID daa_results_df <- ggpicrust2::pathway_daa(abundance = abundance, metadata = metadata, group = "Vacc_St" , daa_method ="ALDEx2",p.adjust = "BH") daa_results_df[daa_results_df$method=="ALDEx2_Kruskal-Wallace test",] pathway_errorbar(abundance,daa_results_df,metadata$Vacc_St,ko_to_kegg = FALSE, p_values_threshold = 0.05, order = "group", p_value_bar = TRUE, colors = NULL, x_lab = "feature",select = c("ko00562", "ko00440", "ko04111", "ko05412", "ko00310", "ko04146", "ko00600", "ko04142", "ko00604", "ko04260", "ko04110", "ko04976", "ko05222", "ko05416", "ko00380", "ko05322", "ko00625", "ko00624", "ko00626", "ko00621"))
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1495830696, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJTJQJGMSQ276PP3KE3W7QCZPANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
Hello Caffery, Could you kindly help me out with the issue in the recent thread below? Thank you.
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Jewelna Akorli @.> Sent: Tuesday, April 4, 2023 2:21:16 PM To: cafferychen777/ggpicrust2 @.>; cafferychen777/ggpicrust2 @.> Cc: Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
Hello, I try repeating the same command to compare two factor levels, for example, NP and VP. SO I have formatted my metadata table and pre_metagenome_unstrat output to include only these two levels of interest. However, when I run the same commands you gave (just changing names for the new ones),
NPVP= read.csv("picrust2/picrust2_out/pi_metadata_NP_VP.csv", header=T, sep=",") abundance_NPVP <- ko2kegg_abundance("picrust2/picrust2_out/KO_metagenome_out/pred_metagenome_unstrat_NPVP.tsv") rownames(NPVP) <- NPVP$SampleID NPVP_daa_results_df <- ggpicrust2::pathway_daa(abundance = abundance_NPVP, metadata = NPVP, group = "Vacc_St" ,daa_method ="ALDEx2",p.adjust = "BH")
I get an error:
operating in serial modecomputing center with all featuresoperating in serial modeError in contrasts<-
(*tmp*
, value = contr.funs[1 + isOF[nn]]) : contrasts can be applied only to factors with 2 or more levels
Why??
[https://attachments.office.net/owa/jakorli%40noguchi.ug.edu.gh/service.svc/s/GetAttachmentThumbnail?id=AQMkAGIxZmEwOGIyLTk0ZTEtNGQ1Zi05NTFmLTE2NzhlNzIxNWI2YgBGAAADiU37%2F0FZk0yo5YuO7cioxAcA3kRsTvbVEEeQyHKcgY4c7wAAAgEMAAAAE%2B%2FrMjbLFU%2B7iagGUsFA8wAFzmhD3AAAAAESABAAi4Fpj6rJZk6j48sIK77HqA%3D%3D&thumbnailType=2&token=eyJhbGciOiJSUzI1NiIsImtpZCI6IkQ4OThGN0RDMjk2ODQ1MDk1RUUwREZGQ0MzODBBOTM5NjUwNDNFNjQiLCJ0eXAiOiJKV1QiLCJ4NXQiOiIySmozM0Nsb1JRbGU0Tl84dzRDcE9XVUVQbVEifQ.eyJvcmlnaW4iOiJodHRwczovL291dGxvb2sub2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QDeQjiCvl96rz6zS6viDFIpk4tc0bordbtkQans8wqTn35ibkOD5YmO2OW87a7zlS2ZUCJ3SSa26DzFkpPBlvc1m8FFt455f74zRn9YKFvIw-OoG2gUyHgHXrju8pFMGj1_ti5b_mbcYSgwEpqcQ&X-OWA-CANARY=ODzZilt9-Ey-H0hl-CMynKCcZJsXNdsYOjH-OYQLjjleHqnuVTKb8YRTcjHJ1K2enUcq6PltFjk.&owa=outlook.office.com&scriptVer=20230324008.13&animation=true]https://www.ug.edu.gh/
Jewelna Efua Birago Akorli (PhD)
Senior Research Fellow & Wellcome Trust Intermediate Fellow
Department of Parasitology,
Noguchi Memorial Institute for Medical Research,
College of Health Sciences
University of Ghana
Email: @.***
Website: noguchi.https://noguchi.org.gh/org.gh
From: Caffery Yang @.> Sent: 04 April 2023 11:46 To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
It's a more comprehensive version.
metadata <- read_csv("~/Downloads/pi_metadata_copy.csv") abundance <- ko2kegg_abundance("/Users/apple/Downloads/pred_metagenome_unstrat.tsv/pred_metagenome_unstrat.tsv") group <- "Vacc_St"
rownames(metadata) <- metadata$SampleID daa_results_df <- ggpicrust2::pathway_daa(abundance = abundance, metadata = metadata, group = "Vacc_St" , daa_method ="ALDEx2",p.adjust = "BH") daa_results_df[daa_results_df$method=="ALDEx2_Kruskal-Wallace test",] pathway_errorbar(abundance,daa_results_df,metadata$Vacc_St,ko_to_kegg = FALSE, p_values_threshold = 0.05, order = "group", p_value_bar = TRUE, colors = NULL, x_lab = "feature",select = c("ko00562", "ko00440", "ko04111", "ko05412", "ko00310", "ko04146", "ko00600", "ko04142", "ko00604", "ko04260", "ko04110", "ko04976", "ko05222", "ko05416", "ko00380", "ko05322", "ko00625", "ko00624", "ko00626", "ko00621"))
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1495830696, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJTJQJGMSQ276PP3KE3W7QCZPANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
Hello @JAkorli ,
Actually I can't open your attachments. Can you upload it with Github? And when you have a problem, you can ask chatgpt first, it is my teacher in many ways.
Best regards,
But what does the error mean? Since you write the code, I thought you would be the best person to help rather than AI 😀
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Caffery Yang @.> Sent: Thursday, April 6, 2023 5:45:26 AM To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
Hello @JAkorlihttps://github.com/JAkorli ,
Actually I can't open your attachments. Can you upload it with Github? And when you have a problem, you can ask chatgpt first, it is my teacher in many ways.
Best regards,
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1498523621, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJRA7G4SA7WRGMFAZNTW7ZJ7NANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
But what does the error mean? Since you write the code, I thought you would be the best person to help rather than AI 😀 Sent from Outlook for Androidhttps://aka.ms/AAb9ysg … ____ From: Caffery Yang @.> Sent: Thursday, April 6, 2023 5:45:26 AM To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8) Hello @JAkorlihttps://github.com/JAkorli , Actually I can't open your attachments. Can you upload it with Github? And when you have a problem, you can ask chatgpt first, it is my teacher in many ways. Best regards, — Reply to this email directly, view it on GitHub<#8 (comment)>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJRA7G4SA7WRGMFAZNTW7ZJ7NANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
If I don't see the attachments, I won't know where the errors come from.
I have uploaded the files on github
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Caffery Yang @.> Sent: Thursday, April 6, 2023 5:52:38 AM To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
But what does the error mean? Since you write the code, I thought you would be the best person to help rather than AI 😀 Sent from Outlook for Androidhttps://aka.ms/AAb9ysg … ____ From: Caffery Yang @.> Sent: Thursday, April 6, 2023 5:45:26 AM To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8https://github.com/cafferychen777/ggpicrust2/issues/8) Hello @JAkorlihttps://github.com/JAkorlihttps://github.com/JAkorli , Actually I can't open your attachments. Can you upload it with Github? And when you have a problem, you can ask chatgpt first, it is my teacher in many ways. Best regards, — Reply to this email directly, view it on GitHub<#8 (comment)https://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1498523621>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJRA7G4SA7WRGMFAZNTW7ZJ7NANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
If I don't see the attachments, I won't know where the errors come from.
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1498528039, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJVDIIV5GJRB234NJGDW7ZK2NANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
Hello, I haven't heard from you concerning my last complaint and sending you the files you request. Can you kindly revert. Thanks.
Jewelna
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Jewelna Akorli @.> Sent: Thursday, April 6, 2023 6:10:24 AM To: cafferychen777/ggpicrust2 @.>; cafferychen777/ggpicrust2 @.> Cc: Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
I have uploaded the files on github
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg
From: Caffery Yang @.> Sent: Thursday, April 6, 2023 5:52:38 AM To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8)
But what does the error mean? Since you write the code, I thought you would be the best person to help rather than AI 😀 Sent from Outlook for Androidhttps://aka.ms/AAb9ysg … ____ From: Caffery Yang @.> Sent: Thursday, April 6, 2023 5:45:26 AM To: cafferychen777/ggpicrust2 @.> Cc: Jewelna Akorli @.>; Mention @.> Subject: Re: [cafferychen777/ggpicrust2] I end up with 0 obs. for my kegg_abundance (Issue #8https://github.com/cafferychen777/ggpicrust2/issues/8) Hello @JAkorlihttps://github.com/JAkorlihttps://github.com/JAkorli , Actually I can't open your attachments. Can you upload it with Github? And when you have a problem, you can ask chatgpt first, it is my teacher in many ways. Best regards, — Reply to this email directly, view it on GitHub<#8 (comment)https://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1498523621>, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJRA7G4SA7WRGMFAZNTW7ZJ7NANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
If I don't see the attachments, I won't know where the errors come from.
— Reply to this email directly, view it on GitHubhttps://github.com/cafferychen777/ggpicrust2/issues/8#issuecomment-1498528039, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ASUJNJVDIIV5GJRB234NJGDW7ZK2NANCNFSM6AAAAAAWQRMGJE. You are receiving this because you were mentioned.Message ID: @.***>
Your metadata is wrong. The dimensions of the two tables are not matched, the number of columns of kegg_abundance should be equal to the number of rows of metadata.
<img width="404" alt="截屏2023-04-13 14 34 22" JAkorli.R.zip src="https://user-images.githubusercontent.com/82987086/231673942-62eceeac-c794-48eb-acf9-5d84163f6cea.png">
Your metadata is wrong. The dimensions of the two tables are not matched, the number of columns of kegg_abundance should be equal to the number of rows of metadata.
<img width="404" alt="截屏2023-04-13 14 34 22" JAkorli.R.zip src="https://user-images.githubusercontent.com/82987086/231673942-62eceeac-c794-48eb-acf9-5d84163f6cea.png">
@JAkorli
What I am running
R-Console feedback: "> kegg_abundance <- ko2kegg_abundance(file = ko_abundance_file) Rows: 2286 Columns: 51
── Column specification ──────────────────────────────────────────────────────────────────────────── Delimiter: "\t" chr (1): function dbl (50): 142-Pre, 143-Pre, 147-Pre, 162-Pre, 165-Pre, 176P, 180-Pre, 181-Pre, 196-Pre, 197P, M1...
ℹ Use
spec()
to retrieve the full column specification for this data. ℹ Specify the column types or setshow_col_types = FALSE
to quiet this message. Calculation may take a long time, please be patient. The kegg pathway with zero abundance in all the different samples has been removed."Question:
Why am I ended up with zero obs. in the abundance file?