Skip to content
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

Missing name field in bedcov #33

Closed
johnmu opened this issue Jun 22, 2015 · 2 comments
Closed

Missing name field in bedcov #33

johnmu opened this issue Jun 22, 2015 · 2 comments
Labels

Comments

@johnmu
Copy link

johnmu commented Jun 22, 2015

line:

chrom, start_s, end_s, name, basecount_s = line.split('\t')

samtools bedcov doesn't return a "name" fields as far as I know. Where does this name field come from?

@etal
Copy link
Owner

etal commented Jun 22, 2015

Sure it does, at least if the input BED file also contains a "name" field in the 4th column.

$ more some-targets.bed 
chr1    30330   30540   MIR1302-10
chr1    35051   35290   FAM138A
chr1    35290   35529   FAM138A
chr1    35623   35833   FAM138A
chr1    69039   69294   OR4F5
chr1    69294   69549   OR4F5
chr1    69549   69804   OR4F5
chr1    69804   70059   OR4F5
chr1    367618  367873  OR4F16
chr1    367873  368128  OR4F16

$ samtools bedcov -Q 1 some-targets.bed some-reads.bam 
chr1    30330   30540   MIR1302-10  0
chr1    35051   35290   FAM138A 0
chr1    35290   35529   FAM138A 50
chr1    35623   35833   FAM138A 0
chr1    69039   69294   OR4F5   0
chr1    69294   69549   OR4F5   1228
chr1    69549   69804   OR4F5   748
chr1    69804   70059   OR4F5   0
chr1    367618  367873  OR4F16  0
chr1    367873  368128  OR4F16  0


$ samtools 

Program: samtools (Tools for alignments in the SAM format)
Version: 0.1.19-44428cd
...

@johnmu
Copy link
Author

johnmu commented Jun 22, 2015

Ah I see, yeah my BED file was missing the 4th column. Thanks!

@johnmu johnmu closed this as completed Jun 22, 2015
@etal etal added the bug label Dec 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants