Entering edit mode
5.6 years ago
zizigolu
★
4.3k
Hi,
I have called SNV for tumour and matched normal, now I have .vcf and I want to tumour and normal sequencing depth something like below
> head(mut_data)
Sample Type CHROM POS REF ALT `**Tumor_Varcount Tumor_Depth Normal_Depth**` Gene_Name Driver
1 CHC2432T SNV chr1 102961055 G A 4 64 62 <NA> <NA>
2 CHC2432T SNV chr1 105492588 A T 7 66 73 <NA> <NA>
3 CHC2432T SNV chr1 108628724 C T 4 45 54 <NA> <NA>
4 CHC2432T SNV chr1 109692113 G T 2 53 29 <NA> <NA>
5 CHC2432T SNV chr1 109692114 G T 2 53 31 <NA> <NA>
6 CHC2432T SNV chr1 120676701 T C 3 48 87 <NA> <NA>
>
For 5 columns at first I know this is the code %CHROM\t%POS\t%REF\t%ALT{0}\n
but for getting Tumor_Varcount Tumor_Depth Normal_Depth
I really don't know
Any help please?
What have you attempted so far?
I tried to installed mosdepth but I am getting error
I heard this tool calculate read depth as a bed
As a rule, always use
conda install -c <channel_name> <package_name>
. That way, you are controlling the source explicitly. Also, addconda-forge
andbioconda
to your channels ensuringconda-forge
is added last (so it becomes the first source to check).Did you read the error?
It's not available in the channels you currently use for
conda
.Simple googling
conda mosdepth
will lead you to https://anaconda.org/bioconda/mosdepth which shows you exactly the command you need.thank you, even after getting read depth by mosdepth, I have to adapt the read depths at position based on my .filtered .vcf file that would be another challenge. Is the anyway to get these columns directly from .vcf file itself?
mosdepth will give you a bed file. With a bed file you can annotate your vcf file. For example look at vcfanno.
There is only a couple of minutes between the help you receive from jrj.healey and your next question, which means that you did not think or try anything at all to solve your problem. You are in bioinformatics for years now, and the answer to many issues is just a google search away. Or just try a couple of things. And there is nothing wrong with that: we google all the time. There are many coding patterns in my python scripts which I have used tons of times and can't remember. I don't know the syntax of
samtools addreplacerg
. Make us do bioinformatics without internet and we're in trouble. We know nothing :) but we can figure it out, and it's time that you learn that too. This looks like imposter syndrome, in which you have the impression that you cannot do this and everyone else is smarter, but I'm sure you can, too.By @jrj.healey comment I installed mosdepth and that is running on my tumour and normal samples meanwhile I imagined I have this depth then what can I do for
Tumor_Varcount
that is why I askedI have a syndrome in which I afraid of being fired because I have different things to do :(
Believe it or not, I have that exact same fear of being fired because my boss "detemines I'm not worth having around". The way I address that fear is by getting more involved at work and focusing on being the person that can find solutions, not becoming the person that already has the solutions. Your institution/supervisor needs problem solvers, not encyclopedias.
Focus on finding solutions yourself and see how that fear goes away.
You aren't doing yourself any favours by not reading error messages and the like. You couldn't ask for a clearer description of the problem, and guidance on what to try next, than the message you got from
conda
.In less than the time it took you to write this post, you could have searched google for
conda
andmosdepth
and have answered your own question.The forum is, of course, here to help - but by leaning on us too heavily you are doing yourself no favours. It's equivalent to being told the answers when you take a test, sure, it might get you through the test in the short term - but you're cheating yourself out of useful knowledge, and you won't have those lessons in hand when you inevitably come to need them the next time.
Cross-posted on GitHub
Sorry but this is really a difficult problem
I finished with mosdepth and I have a bed with sequencing depth for cancer and normal but the positions are not the same with positions in .vcf at all
This is my combined bed from mosdepth
It does not matter how difficult the problem is, GitHub issues are not the place to ask questions on how to use a tool. Unless you find a bug in a tool or have a really specific feature request, please do not open issues on GitHub.
Please add the command you used for mosdepth.
Code I used
So you ask bins per 10kb, and not per base coverage, and then you're surprised it doesn't match?
I used that per base but again nothing matches with positions in .vcf
Can you post a couple of lines of your vcf file?
Sorry I have shared one of my .vcf files by this link
https://www.dropbox.com/s/lfn9greycjybnrt/_double_filtered_013_pre_indels.vcf?dl=0
Actually I need to extract Tumor_Varcount = Number of variant bases at the position in the tumor sample , Tumor_Depth and Normal_Depth from that
This is 2 lines of my .vcf
I am not sure what program you are using to generate the .vcfs. But you should look into the manual of the program and see if it outputs depths using the format fields in the vcf. For example, you have "DP" field in your vcf that shows the depth of the individual samples. Perhaps one of the other fields in there (SDP, SUBDP) will give you more specific depth info.
Edit** Looking at your vcf headers, it looks like you just have two samples, normal and tumor. So you can just use the DP info from the two samples and get your depth. For example, your first loci has the following format fields:
So according to this (DP field of normal and tumor), your normal sample has a depth of 20 and tumor sample has a depth of 18.
Thanks a lot, I called mutations by strelka