Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shell in the README is wrong #11

Open
CancerGenome opened this issue Jan 20, 2020 · 1 comment
Open

Shell in the README is wrong #11

CancerGenome opened this issue Jan 20, 2020 · 1 comment

Comments

@CancerGenome
Copy link

Hi Guo,

From your description, I found a bug which may affect all following results:

The count from your awk is actually the account of total sample size, which will be an integar number. My guess you should inlucde you total number here. For example: if(count/333).

"In analogous fashion to above, we then created a bed file for the cases containing only positions with > 90% of samples with DP > 10: zcat cases.counts.txt.gz | tail -n+2 | awk '{count=0} {for(i=4; i<1000; i++) if($i>10) count++} {if(count>0.9) print $1}' | awk -F":" '{print $1"\t"($2-1)"\t"$2}' | bedtools merge -i stdin > cases.dp10.bed"

@misrak
Copy link

misrak commented Sep 26, 2022

Hi,

I do not think it is wrong but it was not explained properly.

$sample_count = 0.90*(total # of samples) (for example: 90% of 110 samples is 99. Therefore, $sample_count = 99)

zcat cases_coverage.txt.gz | tail -n+2 | awk -F"," '{count=0} {for(i=4; i<1000; i++) if($i>10) count++} {if(count>$sample_count) print $1}' | awk -F":" '{print $1"\t"($2-1)"\t"$2}' | bedtools merge -i stdin > cases.dp10.bed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants