def dalignbed2dalignbedqueriesseq(cfg):
    """
    Get sequences from BED file
    step#6

    :param cfg: configuration dict
    """
    datatmpd=cfg['datatmpd']
    dalignbedqueries=del_Unnamed(pd.read_csv(cfg['dalignbedqueriesp'],sep='\t'))
    dalignedfasta=del_Unnamed(pd.read_csv(cfg['dalignedfastap'],sep='\t'))
    dalignbedqueriesseqp=cfg['dalignbedqueriesseqp']
    logging.info(basename(dalignbedqueriesseqp))
    if not exists(dalignbedqueriesseqp) or cfg['force']:        
        dalignbedqueriesseq=pd.merge(dalignbedqueries,dalignedfasta,on='id',suffixes=('', '.2'))
        dalignbedqueriesseq=dalignbedqueriesseq.dropna(subset=['aligned sequence'],axis=0)

        # dalignbed.index.name='id'
        dalignbedqueriesseq=dalignbedqueriesseq.drop_duplicates()
        dalignbedqueriesseq.to_csv(dalignbedqueriesseqp,sep='\t')
    return cfg