"C" and "G" positions
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?
• 914 views
•
link
1 answer
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
• 0 views
•
link
Log in to answer this question.
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`)