TSS_and_TES/make_read_start_bed_file.py
def starts2bed(data, outprefix):
    """ Converts start positions from SAM read annot file to BED format.
        Returns name of outfile """

    bed_file = outprefix + "_known_read_starts.bed"

    bed_data = data[["chrom", "read_start"]].copy()
    bed_data["end"] = bed_data["read_start"]
    bed_data["read_start"] -= 1
    bed_data["name"] = data["read_name"]
    bed_data["score"] = "."
    bed_data["strand"] = data["strand"]

    bed_data.to_csv(bed_file, sep = '\t', header = False, index = False)
    return bed_file
 Converts start positions from SAM read annot file to BED format.
        Returns name of outfile 
Converts start positions from SAM read annot file to BED format.
Returns name of outfile
Converts start positions from SAM read annot file to BED format . Returns name of outfile
def starts2bed(data, outprefix):
    bed_file = outprefix + "_known_read_starts.bed"
    bed_data = data[["chrom", "read_start"]].copy()
    bed_data["end"] = bed_data["read_start"]
    bed_data["read_start"] -= 1
    bed_data["name"] = data["read_name"]
    bed_data["score"] = "."
    bed_data["strand"] = data["strand"]
    bed_data.to_csv(bed_file, sep = '\t', header = False, index = False)
    return bed_file
def starts2bed ( data , outprefix ) : bed_file = outprefix + "_known_read_starts.bed" bed_data = data [ [ "chrom" , "read_start" ] ] . copy ( ) bed_data [ "end" ] = bed_data [ "read_start" ] bed_data [ "read_start" ] -= 1 bed_data [ "name" ] = data [ "read_name" ] bed_data [ "score" ] = "." bed_data [ "strand" ] = data [ "strand" ] bed_data . to_csv ( bed_file , sep = '\t' , header = False , index = False ) return bed_file
Converts start positions from SAM read annot file to BED format.
Converts start positions from SAM read annot file to BED format .
""" Converts start positions from SAM read annot file to BED format.
        Returns name of outfile """
data
outprefix