Skip to main content
25 events
when toggle format what by license comment
Apr 24, 2017 at 9:08 comment added terdon Use Kusalananda's answer, but change the character range from [ACTG] to all allowed characters: [ACTG-] or, depending on what you are doing, [ACTGUN-]. So, something like awk '$5 ~ /^[ACGT-]$/ && $6 ~ /^[ACGT-]$/ || NR == 1' data.in
Apr 24, 2017 at 9:06 comment added stack_learner but @terdon Could you also tell me how to get the single nucleotide deletions.
Apr 24, 2017 at 9:05 comment added stack_learner Actually for this question I need only Insertions
Apr 24, 2017 at 8:54 comment added Thor @user3351523: No you didn't. Please answer terdon's last question
Apr 24, 2017 at 8:48 answer added user218374 timeline score: 1
Apr 24, 2017 at 8:41 comment added stack_learner yes..I made changes for that....do you think this is right? awk 'NR==1{print; next} $5 ~ /^[A-Z]$/ | awk -F'\t' '$6=="-"' filename
Apr 24, 2017 at 8:38 comment added terdon And do you also want single nucleotide deletions? What if the ref is T and the alt is -, for example? Both T and - are single characters, should that line be printed?
Apr 24, 2017 at 8:37 history edited terdon CC BY-SA 3.0
deleted 4 characters in body
Apr 24, 2017 at 8:35 vote accept stack_learner
Apr 24, 2017 at 8:30 vote accept stack_learner
Apr 24, 2017 at 8:35
Apr 24, 2017 at 8:23 answer added Kusalananda timeline score: 7
Apr 24, 2017 at 8:22 vote accept stack_learner
Apr 24, 2017 at 8:30
Apr 24, 2017 at 8:17 answer added Valentin B. timeline score: 7
Apr 24, 2017 at 8:14 comment added stack_learner Very sorry. I edited now and I need all the columns based on "ref" and "alt" columns with single character.
Apr 24, 2017 at 8:13 history edited stack_learner CC BY-SA 3.0
added 95 characters in body
Apr 24, 2017 at 8:11 comment added Kusalananda It is clear that you want to pick out a unique line for each sample, but I can't see what criteria you use to pick the one you do.
Apr 24, 2017 at 8:11 comment added terdon We can't give you the right command if you don't tell us what you are trying to do. What is the relationship between your input and output? How do you get from the input to that output? You seem to just be printing 3 random lines. Please edit your question and explain your objective.
Apr 24, 2017 at 8:11 comment added stack_learner @ZumodeVidrio No that doesn't work.
Apr 24, 2017 at 8:09 history edited terdon CC BY-SA 3.0
That's a file, not a data frame. ; edited tags
Apr 24, 2017 at 8:09 comment added Zumo de Vidrio I think you may want to take the values of 5th and 6th columns with this awk syntax: awk 'OFS="\t" {print $5,$6}' dataframe_file, but you haven't provided enough information about how you want to filter based on these fields.
Apr 24, 2017 at 8:09 comment added stack_learner Ya I know but I'm not aware about what I need to give. Could you please give me the right command.
S Apr 24, 2017 at 8:08 history suggested Zumo de Vidrio CC BY-SA 3.0
improved formatting
Apr 24, 2017 at 8:05 comment added Kusalananda You will have to explain a bit more about how the expected output is derived from the given input.
Apr 24, 2017 at 8:04 review Suggested edits
S Apr 24, 2017 at 8:08
Apr 24, 2017 at 8:01 history asked stack_learner CC BY-SA 3.0