This is a test version of Biostars. For the public version, visit https://www.biostars.org.
picard tools error in strand field

I have a bed file formatted for picard-tools:

BI=

@HD    VN:1.4    GO:none    SO:coordinate
@SQ    SN:chr1    LN:249250621
@SQ    SN:chr2    LN:243199373
@SQ    SN:chr3    LN:198022430
@SQ    SN:chr4    LN:191154276
@SQ    SN:chr5    LN:180915260
@SQ    SN:chr6    LN:171115067
@SQ    SN:chr7    LN:159138663
@SQ    SN:chr8    LN:146364022
@SQ    SN:chr9    LN:141213431
@SQ    SN:chr10    LN:135534747
@SQ    SN:chr11    LN:135006516
@SQ    SN:chr12    LN:133851895
@SQ    SN:chr13    LN:115169878
@SQ    SN:chr14    LN:107349540
@SQ    SN:chr15    LN:102531392
@SQ    SN:chr16    LN:90354753
@SQ    SN:chr17    LN:81195210
@SQ    SN:chr18    LN:78077248
@SQ    SN:chr19    LN:59128983
@SQ    SN:chr20    LN:63025520
@SQ    SN:chr21    LN:48129895
@SQ    SN:chr22    LN:51304566
@SQ    SN:chrX    LN:155270560
@SQ    SN:chrY    LN:59373566
@SQ    SN:chrM    LN:16569
chr1    955542    955662    +    AGRN_70
chr1    955643    955763    +    AGRN_71
chr1    957570    957690    +    AGRN_72

TI=

@HD    VN:1.4    GO:none    SO:coordinate
@SQ    SN:chr1    LN:249250621
@SQ    SN:chr2    LN:243199373
@SQ    SN:chr3    LN:198022430
@SQ    SN:chr4    LN:191154276
@SQ    SN:chr5    LN:180915260
@SQ    SN:chr6    LN:171115067
@SQ    SN:chr7    LN:159138663
@SQ    SN:chr8    LN:146364022
@SQ    SN:chr9    LN:141213431
@SQ    SN:chr10    LN:135534747
@SQ    SN:chr11    LN:135006516
@SQ    SN:chr12    LN:133851895
@SQ    SN:chr13    LN:115169878
@SQ    SN:chr14    LN:107349540
@SQ    SN:chr15    LN:102531392
@SQ    SN:chr16    LN:90354753
@SQ    SN:chr17    LN:81195210
@SQ    SN:chr18    LN:78077248
@SQ    SN:chr19    LN:59128983
@SQ    SN:chr20    LN:63025520
@SQ    SN:chr21    LN:48129895
@SQ    SN:chr22    LN:51304566
@SQ    SN:chrX    LN:155270560
@SQ    SN:chrY    LN:59373566
@SQ    SN:chrM    LN:16569
chr1    955543    955763    +    AGRN-6|gc=75
chr1    957571    957852    +    AGRN-7|gc=61.2
chr1    970621    970740    +    AGRN-8|gc=57.1
Exception in thread "main" java.lang.IllegalArgumentException: Invalid strand field:

This format seemed to work fine in 1.139. Did something change?

Thank you :)

picard-tools

please, show us the output of

grep -v '^@' your.bed  | awk -F '\t' '{print NF;}' | sort | uniq

BI=

cmccabe@DTV-A5211QLM:~/Desktop/NGS/bed/picard$  grep -v '^@' unix_sam_sorted_xgen_baits.bed  | awk -F '\t' '{print NF;}' | sort | uniq
5

TI=

cmccabe@DTV-A5211QLM:~/Desktop/NGS/bed/picard$ grep -v '^@' unix_sam_sorted_xgen_targets.bed  | awk -F '\t' '{print NF;}' | sort | uniq
5

When I create a standard 6 column bed, picard throws the error:

Exception in thread "main" htsjdk.samtools.SAMException: Invalid interval record contains 6 fields: chr1    955543    955763    AGRN-6|gc=75    0    +

When I use the 5 column bed I get:

Exception in thread "main" java.lang.IllegalArgumentException: Invalid strand field:

Thank you :).

1 answer

ah got it, this is not an official BED format see the spec: https://genome.ucsc.edu/FAQ/FAQformat.html#format1

name is column 4

strand is column 6

furthermore , this not not a valid header for a BED.

Log in to answer this question.