hey (:
(sorry for my spelling mistakes)
i got an assignment to write a function, the input will be a file of some sort and if its a bed type file it will return True.
we have to use regular expression for this!
i wanted to creat a sample dict from a bed file and compar the lines of any file that will be put to the function to the sample dict. But this way dosent use regular expression
the criterias for the function to return Treu are:
the bed file has 3 coloums
the first line is the discreption and stars with- #
firs colume starts with- chr and foloowed by an int or a one letter string.
secound colume is an int >0
third colume is an int>0
each colume seperated by tab
like so:
#Chromosome start_coordinate end_coordinate
chr1 19045 26433
chr2 374745 375876
chr 91234 2001
please help me,
thank u in advance
(sorry for my spelling mistakes)
i got an assignment to write a function, the input will be a file of some sort and if its a bed type file it will return True.
we have to use regular expression for this!
i wanted to creat a sample dict from a bed file and compar the lines of any file that will be put to the function to the sample dict. But this way dosent use regular expression
the criterias for the function to return Treu are:
the bed file has 3 coloums
the first line is the discreption and stars with- #
firs colume starts with- chr and foloowed by an int or a one letter string.
secound colume is an int >0
third colume is an int>0
each colume seperated by tab
like so:
#Chromosome start_coordinate end_coordinate
chr1 19045 26433
chr2 374745 375876
chr 91234 2001
please help me,
thank u in advance