Entering edit mode
4.1 years ago
denafridman
•
0
I need to creat a BED file with all "C"s positions, and another one with all "G" position in Human38. how can I do that?
I need to creat a BED file with all "C"s positions, and another one with all "G" position in Human38. how can I do that?
cut -f 1 /path/ref.fa.fai | while read S ; do samtools faidx -n 1 /path/ref.fa $S | awk -v S=$S '/^[CGcg]/ {printf("%s\t%d\t%d\n",S,NR-1,NR);}' ; done
Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Locating A Sequence In A Fasta File.
Be aware that the list is going to be extensively long and big, given roughly 25% of nucleotides being either G or C this will be 750.000.000 entries per C and G.
it semms like im missing something... /path/ref.fa.fai - what path should it be?
path to the indexed fasta reference (indexed with 'samtools faidx`)