16S 差异比较使用compare_errorbar.r的时候报错

我用这个代码是他的前一步不报错,但是这一步报错,代表我的分组信息这些都是准确的

这个代码不报错

for i in {2..6};do
    Rscript $scriptdir/meta_stat.r -i ../05.export_data/taxa_summary/absolute_abundance/feature_table_tax_L$i.txt \
-m $metadata -t Group \
-a WSD_Lig_PPI -b WSD_PPI \
-o meta_stat --name WSD_Ligatur_vsKD_Ligatur_Lppi$i
done
#但是这个代码就开始报错了

for m in "ALDEx2" "DESeq2" "edgeR" "limma.voom" "metagenomeSeq" "LinDA" "Maaslin2" "Lefser" ;do
table=../05.export_data/taxa_summary/absolute_abundance/feature_table_tax_L6.txt
#table=../05.export_data/feature_table.txt
Rscript $scriptdir/compare_errorbar.r -i $table \
-m $metadata -t Group \
-a WSD_Lig_PPI -b WSD_PPI \
--daa_method $m \
--p_values_threshold 1 \
--top 20 \
-o compare_errorbar --prefix WSD_Ligatur_vsKD_Ligatur_ppiL6
done

# 报错信息如下

for m in "ALDEx2" "DESeq2" "edgeR" "limma.voom" "metagenomeSeq" "LinDA" "Maaslin2" "Lefser" ;do > table=../05.export_data/taxa_summary/absolute_abundance/feature_table_tax_L6.txt > #table=../05.export_data/feature_table.txt > Rscript $scriptdir/compare_errorbar.r -i $table \ > -m $metadata -t Group \ > -a WSD_Lig_PPI -b WSD_PPI \ > --daa_method $m \ > --p_values_threshold 1 \ > --top 20 \ > -o compare_errorbar --prefix WSD_Ligatur_vsKD_Ligatur_ppiL6 > done --> Q&A for bioinformatics, please visit the website: https://www.omicsclass.com/ --> R beginners ? I suggest your learning R language: https://study.omicsclass.com/index Failed to create bus connection: No such file or directory ── Attaching core tidyverse packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 2.0.0 ── ✔ dplyr 1.1.3 ✔ purrr 1.0.2 ✔ forcats 1.0.0 ✔ stringr 1.5.0 ✔ ggplot2 3.4.4 ✔ tidyr 1.3.0 ✔ lubridate 1.9.3 ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag() ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors Warning message: In system("timedatectl", intern = TRUE) : running command 'timedatectl' had status 1 Rows: 18 Columns: 7 ── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Delimiter: "\t" chr (3): KOT, date, Group dbl (4): #SampleID, MouseNR, Plate, DES ℹ 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. Error in `select()`: ! Can't subset columns with `metaData[, 1, drop = T]`. ✖ Can't convert from `metaData[, 1, drop = T]` <double> to <integer> due to loss of precision. Backtrace: ▆ 1. ├─dplyr::select(abundance_data, metaData[, 1, drop = T]) 2. ├─dplyr:::select.data.frame(abundance_data, metaData[, 1, drop = T]) 3. │ └─tidyselect::eval_select(expr(c(...)), data = .data, error_call = error_call) 4. │ └─tidyselect:::eval_select_impl(...) 5. │ ├─tidyselect:::with_subscript_errors(...) 6. │ │ └─rlang::try_fetch(...) 7. │ │ └─base::withCallingHandlers(...) 8. │ └─tidyselect:::vars_select_eval(...) 9. │ └─tidyselect:::walk_data_tree(expr, data_mask, context_mask) 10. │ └─tidyselect:::eval_c(expr, data_mask, context_mask) 11. │ └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init) 12. │ └─tidyselect:::walk_data_tree(new, data_mask, context_mask) 13. │ └─tidyselect:::as_indices_sel_impl(...) 14. │ └─tidyselect:::as_indices_impl(...) 15. │ └─vctrs::vec_as_subscript(x, logical = "error", call = call, arg = arg) 16. └─rlang::cnd_signal(x) Execution halted --> Q&A for bioinformatics, please visit the website: https://www.omicsclass.com/ --> R beginners ? I suggest your learning R language: https://study.omicsclass.com/index Failed to create bus connection: No such file or directory ── Attaching core tidyverse packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 2.0.0 ── ✔ dplyr 1.1.3 ✔ purrr 1.0.2 ✔ forcats 1.0.0 ✔ stringr 1.5.0 ✔ ggplot2 3.4.4 ✔ tidyr 1.3.0 ✔ lubridate 1.9.3 ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag() ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors Warning message: In system("timedatectl", intern = TRUE) : running command 'timedatectl' had status 1 Rows: 18 Columns: 7 ── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Delimiter: "\t" chr (3): KOT, date, Group dbl (4): #SampleID, MouseNR, Plate, DES ℹ 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. Error in `select()`: ! Can't subset columns with `metaData[, 1, drop = T]`. ✖ Can't convert from `metaData[, 1, drop = T]` <double> to <integer> due to loss of precision. Backtrace: ▆ 1. ├─dplyr::select(abundance_data, metaData[, 1, drop = T]) 2. ├─dplyr:::select.data.frame(abundance_data, metaData[, 1, drop = T]) 3. │ └─tidyselect::eval_select(expr(c(...)), data = .data, error_call = error_call) 4. │ └─tidyselect:::eval_select_impl(...) 5. │ ├─tidyselect:::with_subscript_errors(...) 6. │ │ └─rlang::try_fetch(...) 7. │ │ └─base::withCallingHandlers(...) 8. │ └─tidyselect:::vars_select_eval(...) 9. │ └─tidyselect:::walk_data_tree(expr, data_mask, context_mask) 10. │ └─tidyselect:::eval_c(expr, data_mask, context_mask) 11. │ └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init) 12. │ └─tidyselect:::walk_data_tree(new, data_mask, context_mask) 13. │ └─tidyselect:::as_indices_sel_impl(...) 14. │ └─tidyselect:::as_indices_impl(...) 15. │ └─vctrs::vec_as_subscript(x, logical = "error", call = call, arg = arg) 16. └─rlang::cnd_signal(x) Execution halted --> Q&A for bioinformatics, please visit the website: https://www.omicsclass.com/ --> R beginners ? I suggest your learning R language: https://study.omicsclass.com/index Failed to create bus connection: No such file or directory ── Attaching core tidyverse packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 2.0.0 ── ✔ dplyr 1.1.3 ✔ purrr 1.0.2 ✔ forcats 1.0.0 ✔ stringr 1.5.0 ✔ ggplot2 3.4.4 ✔ tidyr 1.3.0 ✔ lubridate 1.9.3 ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag() ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors Warning message: In system("timedatectl", intern = TRUE) : running command 'timedatectl' had status 1 Rows: 18 Columns: 7 ── Column specification ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── Delimiter: "\t" chr (3): KOT, date, Group dbl (4): #SampleID, MouseNR, Plate, DES ℹ 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. Error in `select()`: ! Can't subset columns with `metaData[, 1, drop = T]`. ✖ Can't convert from `metaData[, 1, drop = T]` <double> to <integer> due to loss of precision. Backtrace: ▆ 1. ├─dplyr::select(abundance_data, metaData[, 1, drop = T]) 2. ├─dplyr:::select.data.frame(abundance_data, metaData[, 1, drop = T]) 3. │ └─tidyselect::eval_select(expr(c(...)), data = .data, error_call = error_call) 4. │ └─tidyselect:::eval_select_impl(...) 5. │ ├─tidyselect:::with_subscript_errors(...) 6. │ │ └─rlang::try_fetch(...) 7. │ │ └─base::withCallingHandlers(...) 8. │ └─tidyselect:::vars_select_eval(...) 9. │ └─tidyselect:::walk_data_tree(expr, data_mask, context_mask) 10. │ └─tidyselect:::eval_c(expr, data_mask, context_mask) 11. │ └─tidyselect:::reduce_sels(node, data_mask, context_mask, init = init) 12. │ └─tidyselect:::walk_data_tree(new, data_mask, context_mask) 13. │ └─tidyselect:::as_indices_sel_impl(...) 14. │ └─tidyselect:::as_indices_impl(...) 15. │ └─vctrs::vec_as_subscript(x, logical = "error", call = call, arg = arg) 16. └─rlang::cnd_signal(x) Execution halted --> Q&A for bioinformatics, please visit the website: https://www.omicsclass.com/ --> R beginners ? I suggest your learning R language: https://study.omicsclass.com/index Failed to create bus connection: No such file or directory ── Attaching core tidyverse packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse 2.0.0 ── ✔ dplyr 1.1.3 ✔ purrr 1.0.2 ✔ forcats 1.0.0 ✔ stringr 1.5.0 ✔ ggplot2 3.4.4 ✔ tidyr 1.3.0 ✔ lubridate 1.9.3 ── Conflicts ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ── ✖ dplyr::filter() masks stats::filter() ✖ dplyr::lag() masks stats::lag() ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors Warning message: In system("timedatectl", intern = TRUE) : running command 'timedatectl' had status 1






请先 登录 后评论

2 个回答

omicsgene - 生物信息
擅长:重测序,遗传进化,转录组,GWAS

把输入文件截图看看的,你这个metadata文件列分割符不是tab键,对比下课程里面的示例文件;

请先 登录 后评论
Vegetable
请先 登录 后评论