scarHRD icon indicating copy to clipboard operation
scarHRD copied to clipboard

scar_score() with allele-specific segmentation file fails with Error in `[.data.frame`(seg, , 8) : undefined columns selected

Open ThomasGro opened this issue 5 years ago • 6 comments

Hi, I have generated a allele-specific segmentation file with CNVkit. I adapted the format to fit your input "... allele-specific segmentation file with the following columns: 1st column: sample name, 2nd column: chromosome, 3rd column: segmentation start, 4th column: segmentation end, 5th column: total copynumber, 6th column: copy number of A allele, 7th column: copy number of B allele"

sample_name chromosome segment_start segment_end tcn nA nB model1 1 62676830 62677251 30 19 11 model1 1 173836085 177898343 3 2 1 model1 2 677597 1217588 5 4 1

But I get the error:

scar_score("./x.tsv", reference = "grch37") Error in [.data.frame(seg, , 8) : undefined columns selected

It seems the function is expecting an additional column?!

Thank you for your support, Thomas

ThomasGro avatar Feb 14 '20 10:02 ThomasGro

One add on: when I add another column wioth ploidy information as in your example file:

sample_name chromosome segment_start segment_end tcn nA nB ploidy model1 1 62676830 62677251 30 19 11 2 model1 1 173836085 177898343 3 2 1 2 model1 2 677597 1217588 5 4 1 2

I get:

scar_score("./x.tsv", reference = "grch37") Determining HRD-LOH, LST, TAI Error in write.table(t(HRDresulst), paste0(outputdir, "/", run_name, "_HRDresults.txt"), : invalid 'row.names' specification

ThomasGro avatar Feb 14 '20 11:02 ThomasGro

scar_score processes one sample each time.

zhjianli avatar Jan 26 '21 03:01 zhjianli

I did the following:

This is the described input format for HRDscore: 1st column: sample name, 2nd column: chromosome, 3rd column: segmentation start, 4th column: segmentation end, 5th column: total copynumber, 6th column: copy number of A allele, 7th column: copy number of B allele

However in the downstream processing what you need is the same order as in the original method for SNP6 Ascat output: 1: sample id 2: chromosome (numeric) 3: segment start 4: segment end 5: number of probes 6: total copy number 7: nA 8: nB 9: ploidy 10: contamination, aberrant cell fraction

That worked for me

Von: zhjianli [email protected] Gesendet: Dienstag, 26. Januar 2021 03:35 An: sztup/scarHRD [email protected] Cc: Thomas Grombacher [email protected]; Mention [email protected] Betreff: Re: [sztup/scarHRD] scar_score() with allele-specific segmentation file fails with Error in [.data.frame(seg, , 8) : undefined columns selected (#7)

[WARNING – EXTERNAL EMAIL] Do not open links or attachments unless you recognize the sender of this email. If you are unsure please click the button "Report suspicious email"

@ThomasGrohttps://github.com/ThomasGro I had exactly the same issue. Did you solve the problem eventually? Thanks.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/sztup/scarHRD/issues/7#issuecomment-767247631, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AENMOYMCAHPPGPKBZ52H6FDS3YS5JANCNFSM4KVFVVOQ.

This message and any attachment are confidential and may be privileged or otherwise protected from disclosure. If you are not the intended recipient, you must not copy this message or attachment or disclose the contents to any other person. If you have received this transmission in error, please notify the sender immediately and delete the message and any attachment from your system. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not accept liability for any omissions or errors in this message which may arise as a result of E-Mail-transmission or for damages resulting from any unauthorized changes of the content of this message and any attachment thereto. Merck KGaA, Darmstadt, Germany and any of its subsidiaries do not guarantee that this message is free of viruses and does not accept liability for any damages caused by any virus transmitted therewith.

Click http://www.merckgroup.com/disclaimer to access the German, French, Spanish and Portuguese versions of this disclaimer.

ThomasGro avatar Jan 26 '21 12:01 ThomasGro

I had exactly the same issue. Did you solve the problem eventually? Thanks.

sheny-bio avatar Nov 08 '21 14:11 sheny-bio

Please look at my comment from Jan 26th. You have to reorder the columns of the input table - at least that worked for me.

ThomasGro avatar Nov 08 '21 14:11 ThomasGro

5: number of probes

Did this work correctly? I think their test file only has 8 columns with "ploidy" in the end

jwuatx avatar Oct 27 '23 19:10 jwuatx