-
Notifications
You must be signed in to change notification settings - Fork 309
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
how to compare with the last the column for the same chromosome name? #1237
Comments
Hi @Fei-Guang! How do you know which line of the second file (rdd2.kmer) corresponds to which read? If the first read in rdd1.bam should line up with the first line of rdd2.kmer, I'd do:
|
What's the format of the |
hello, @fnothaft Both rdd should have the same chromosome name, it means take the first line of rdd1 as an example, the chromosome name is chr1. Many thanks for the help |
hello @fnothaft the format of the rdd2.kmer is defined by our engineer, not in BED and GTF format |
Hi @Fei-Guang! Where are you running that? Are you running that in |
hello @fnothaft what should be changed in the code if the line of the second file (rdd2.kmer) corresponds the line of the rdd1.bam by the chromosome name? |
@Fei-Guang I think you'd want:
|
$ samtools view rdd1.bam |head -1
$ cat rdd2.kmer | head -10
chr1 1 0.42235 0.01501 10001 110000
chr1 2 0.41104 0.01254 60001 160000
chr1 3 0.42826 0.00282 110001 177417 227418 260000
chr1 4 0.4151 0.00288 160001 177417 227418 267719 317720 360000
chr1 5 0.39534 0.00166 260001 267719 317720 410000
chr1 6 0.42745 0.0008 360001 460000
chr1 7 0.47991 0.0041 410001 471368 521369 560000
chr1 8 0.44 0.00977 460001 471368 521369 610000
chr1 9 0.39048 0.00875 560001 660000
chr1 10 0.42579 0.00624 610001 710000
what i want to do is to compare the 4th column of rdd1.bam with the 5th column and last column of rdd2.kmer if both rdd has the same chromosome name(The third column of rdd1 should be same as the first column of rdd2)
if the 4th column of rdd1.bam in range [the 5th column of rdd2.kmer, the last column of rdd2.kmer]
the count[chr1] ++
how can i do it with adam0.20?
The text was updated successfully, but these errors were encountered: