[BioC] Error while executing ComBat from sva library in bioconductor

Johnson, William Evan wej at bu.edu
Mon Jun 10 15:19:53 CEST 2013


Francesco, 

You need to read the data into an R matrix, and the batch variable should be a vector containing the batches. From the looks of things it looks like you are just passing the file names into the function (but you should be passing the matrix/vectors instead).

Evan


On Jun 10, 2013, at 3:28 AM, francesco.brundu at gmail.com wrote:

> Hi all,
> I am trying to run ComBat on a dataset. I installed sva bioconductor library and I am calling ComBat in this way:
> 
> ComBat(dat='dataset_13294/dChip_signal_13294.csv',batch='sif.tsv', mod=NULL)
> 
> The output of the script is the following:
> 
> Found 1 batches
> Found 1  categorical covariate(s)
> Error in matrix(0, length(vec), nlevels(vec) - start + 1) : 
>   invalid 'ncol' value (< 0)
> 
> I have searched a lot but I did not find any clue to resolve this issue and, since I am an R newbie, I am unable to inspect the code to know what I am doing wrong.
> Here are the first two lines of dat and batch files passed as parameters.
> 
> Thanks
> 
> dat:
> 
> probe set	GSM335547	GSM335547 call	GSM335558	GSM335558 call	GSM335552	GSM335552 call	GSM335597	GSM335597 call	GSM335549	GSM335549 call	GSM335608	GSM335608 call	GSM335529	GSM335529 call	GSM335661	GSM335661 call	GSM335560	GSM335560 call	GSM335655	GSM335655 call	GSM335653	GSM335653 call	GSM335629	GSM335629 call	GSM335562	GSM335562 call	GSM335524	GSM335524 call	GSM335635	GSM335635 call	GSM335663	GSM335663 call	GSM335517	GSM335517 call	GSM335639	GSM335639 call	GSM335591	GSM335591 call	GSM335563	GSM335563 call	GSM335616	GSM335616 call	GSM335652	GSM335652 call	GSM335599	GSM335599 call	GSM335581	GSM335581 call	GSM335515	GSM335515 call	GSM335630	GSM335630 call	GSM335565	GSM335565 call	GSM335659	GSM335659 call	GSM335641	GSM335641 call	GSM335569	GSM335569 call	GSM335542	GSM335542 call	GSM335574	GSM335574 call	GSM335514	GSM335514 call	GSM335516	GSM335516 call	GSM335617	GSM335617 call	GSM335525	GSM335525 call	GSM335541	GSM335541 call	GSM335527	GSM335527 call	GSM335627	GSM335627 call	GSM335657	GSM335657 call	GSM335575	GSM335575 call	GSM335618	GSM335618 call	GSM335571	GSM335571 call	GSM335650	GSM335650 call	GSM335556	GSM335556 call	GSM335590	GSM335590 call	GSM335621	GSM335621 call	GSM335662	GSM335662 call	GSM335619	GSM335619 call	GSM335534	GSM335534 call	GSM335656	GSM335656 call	GSM335593	GSM335593 call	GSM335622	GSM335622 call	GSM335628	GSM335628 call	GSM335626	GSM335626 call	GSM335606	GSM335606 call	GSM335645	GSM335645 call	GSM335568	GSM335568 call	GSM335636	GSM335636 call	GSM335559	GSM335559 call	GSM335526	GSM335526 call	GSM335640	GSM335640 call	GSM335561	GSM335561 call	GSM335522	GSM335522 call	GSM335642	GSM335642 call	GSM335611	GSM335611 call	GSM335637	GSM335637 call	GSM335658	GSM335658 call	GSM335664	GSM335664 call	GSM335532	GSM335532 call	GSM335570	GSM335570 call	GSM335647	GSM335647 call	GSM335537	GSM335537 call	GSM335555	GSM335555 call	GSM335614	GSM335614 call	GSM335588	GSM335588 call	GSM335651	GSM335651 call	GSM335521	GSM335521 call	GSM335564	GSM335564 call	GSM335530	GSM335530 call	GSM335543	GSM335543 call	GSM335572	GSM335572 call	GSM335646	GSM335646 call	GSM335598	GSM335598 call	GSM335553	GSM335553 call	GSM335551	GSM335551 call	GSM335615	GSM335615 call	GSM335578	GSM335578 call	GSM335531	GSM335531 call	GSM335654	GSM335654 call	GSM335583	GSM335583 call	GSM335595	GSM335595 call	GSM335567	GSM335567 call	GSM335536	GSM335536 call	GSM335592	GSM335592 call	GSM335585	GSM335585 call	GSM335643	GSM335643 call	GSM335631	GSM335631 call	GSM335605	GSM335605 call	GSM335576	GSM335576 call	GSM335510	GSM335510 call	GSM335582	GSM335582 call	GSM335604	GSM335604 call	GSM335573	GSM335573 call	GSM335638	GSM335638 call	GSM335612	GSM335612 call	GSM335644	GSM335644 call	GSM335603	GSM335603 call	GSM335577	GSM335577 call	GSM335540	GSM335540 call	GSM335589	GSM335589 call	GSM335535	GSM335535 call	GSM335566	GSM335566 call	GSM335607	GSM335607 call	GSM335610	GSM335610 call	GSM335609	GSM335609 call	GSM335586	GSM335586 call	GSM335648	GSM335648 call	GSM335660	GSM335660 call	GSM335554	GSM335554 call	GSM335546	GSM335546 call	GSM335545	GSM335545 call	GSM335512	GSM335512 call	GSM335579	GSM335579 call	GSM335557	GSM335557 call	GSM335633	GSM335633 call	GSM335600	GSM335600 call	GSM335620	GSM335620 call	GSM335587	GSM335587 call	GSM335519	GSM335519 call	GSM335548	GSM335548 call	GSM335584	GSM335584 call	GSM335528	GSM335528 call	GSM335625	GSM335625 call	GSM335623	GSM335623 call	GSM335596	GSM335596 call	GSM335602	GSM335602 call	GSM335513	GSM335513 call	GSM335544	GSM335544 call	GSM335613	GSM335613 call	GSM335511	GSM335511 call	GSM335550	GSM335550 call	GSM335580	GSM335580 call	GSM335649	GSM335649 call	GSM335533	GSM335533 call	GSM335624	GSM335624 call	GSM335601	GSM335601 call	GSM335594	GSM335594 call	GSM335523	GSM335523 call	GSM335538	GSM335538 call	GSM335539	GSM335539 call	GSM335632	GSM335632 call	GSM335518	GSM335518 call	GSM335520	GSM335520 call	GSM335634	GSM335634 call	
> AFFX-BioB-5_at	9.17	P	8.96	P	9.09	P	8.76	P	8.74	P	8.89	P	6.76	P	9.31	P	8.99	P	7.86	P	7.98	P	8.24	P	7.84	P	6.78	P	8.12	P	8.58	P	7.12	P	7.92	P	8.33	P	8.94	P	8.45	P	7.83	P	8.70	P	9.94	P	6.92	P	8.54	P	8.11	P	9.41	P	8.08	P	8.96	P	7.20	P	7.98	P	6.98	P	6.72	P	8.53	P	7.08	P	7.44	P	7.23	P	8.06	P	9.01	P	9.06	P	8.54	P	8.97	P	8.66	P	8.77	P	8.88	P	7.60	P	7.65	P	8.36	P	7.07	P	8.13	P	8.80	P	8.34	P	8.16	P	9.11	P	8.96	P	7.71	P	8.43	P	8.35	P	8.55	P	6.97	P	8.06	P	8.77	P	8.68	P	8.38	P	9.67	P	9.54	P	8.36	P	8.80	P	6.75	P	9.23	P	9.98	P	7.26	P	8.46	P	8.80	P	8.58	P	8.19	P	7.38	P	8.96	P	6.85	P	7.49	P	9.64	P	8.98	P	8.33	P	9.24	P	8.95	P	8.42	P	8.88	P	7.59	P	8.77	P	8.50	P	9.44	P	8.94	P	6.77	P	8.89	P	9.07	P	8.15	P	7.48	P	8.31	P	8.89	P	6.94	P	9.33	P	8.94	P	8.96	P	9.82	P	8.81	P	8.11	P	8.89	P	8.84	P	7.20	P	9.05	P	7.42	P	8.95	P	8.50	P	9.27	P	8.17	P	8.69	P	10.19	P	8.13	P	8.59	P	7.20	P	7.65	P	6.95	P	8.78	P	8.93	P	8.79	P	8.64	P	8.93	P	8.58	P	7.04	P	8.74	P	8.94	P	8.38	P	8.85	P	8.85	P	8.62	P	8.62	P	7.25	P	7.44	P	8.54	P	7.08	P	8.86	P	9.03	P	8.21	P	7.05	P	8.72	P	8.40	P	8.63	P	7.16	P	7.08	P	7.08	P	7.64	P	6.83	P	8.15	P	7.98	P	
> 
> batch:
> 
> Array name	Sample name	Batch
> GSM335547	GSM335547	1
> 
> -- 
> ~Francesco Brundu



More information about the Bioconductor mailing list